removing strange characters from php string

前端 未结 14 924
忘了有多久
忘了有多久 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:29

    Just one simple solution.

    if your string contains these type of strange chars suppose $text contains some of these then just do as shown bellow:

    $mytext=mb_convert_encoding($text, "HTML-ENTITIES", 'UTF-8')
    

    and it will work..

提交回复
热议问题