Possible Duplicate:
How to replace Microsoft-encoded quotes in PHP
My string is
iPad Applications In Bloom’s Taxonomy and ducause Review: “This Game Sucks”
Now I want to replace " ’ " by " ' " and " “ " by ' " '
Possible Duplicate:
How to replace Microsoft-encoded quotes in PHP
My string is
iPad Applications In Bloom’s Taxonomy and ducause Review: “This Game Sucks”
Now I want to replace " ’ " by " ' " and " “ " by ' " '
echo str_replace(array('’', '“', '”'), array("'", '"', '"'), 'iPad Applications In Bloom’s Taxonomy and ducause Review: “This Game Sucks”');
$text = "iPad Applications In Bloom’s Taxonomy and ducause Review: “This Game Sucks”"
$search = array("’", "“");
$replace = array("'", '"');
$new_text = str_replace($search,$replace,$text);
Try str_replace function.
You can use str_replace :
$string = str_replace(array("’", "“"), array("'", '"'), $string);
You can create array of character what you want to remove and use str_replace to replace with something else.
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);
thanks..