Search code examples
phpreplacespecial-characters

Remove special characters using PHP


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 ' " '


Solution

  • 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..