removing strange characters from php string

前端 未结 14 927
忘了有多久
忘了有多久 2021-01-31 17:45

this is what i have right now

Drawing an RSS feed into the php, the raw xml from the rss feed reads:

Paul’s Confidence

The ph

14条回答
  •  再見小時候
    2021-01-31 18:15

    1.The order of the strings in the $find array is significant. 2.This string "‘" should contain a tilde and look like three characters. If I save the .php file with my Genie editor it gits changed to just two characters "â€". 3.This is a useful reference https://www.i18nqa.com/debug/utf8-debug.html

    ");
    $find = array("‘", "’", "“", "â€");
    $replace = array("‘", "’", "“", "”");
    $text = str_replace($find, $replace, $text);
    echo($text);
    ?>
    

提交回复
热议问题