我的字符串是
iPad Applications In Bloom’s Taxonomy and ducause Review: “This Game Sucks”
现在我要替换" ’ " by " ' " and " “ " by ' " '
答案 0 :(得分:1)
echo str_replace(array('’', '“', '”'), array("'", '"', '"'), 'iPad Applications In Bloom’s Taxonomy and ducause Review: “This Game Sucks”');
答案 1 :(得分:1)
$text = "iPad Applications In Bloom’s Taxonomy and ducause Review: “This Game Sucks”"
$search = array("’", "“");
$replace = array("'", '"');
$new_text = str_replace($search,$replace,$text);
答案 2 :(得分:0)
尝试str_replace功能。
答案 3 :(得分:0)
您可以使用str_replace:
$string = str_replace(array("’", "“"), array("'", '"'), $string);
答案 4 :(得分:0)
您可以创建要删除的字符数组,并使用str_replace替换其他内容。
ex: $remove = array(',','"',"'",'by','and son on..');
$str = iPad Applications In Bloom’s Taxonomy and ducause Review: “This Game Sucks”;
$return = str_replace($remove,' ',$str);
感谢..