dqask02082 2019-07-04 09:30
浏览 139

PHP如何从字符串转换或删除特殊字符?

I want to convert any special charater to it's original value and i am trying with this function but it's not working. This is my code.

  $text = "Tuscaloosa County – Hunting and Timber Invest";

  echo $html = mb_convert_encoding($text, "HTML-ENTITIES", "UTF-8");
  • 写回答

4条回答 默认 最新

  • douchun5969 2019-07-04 09:57
    关注

    I do not know if that's what you want but try it

    $text = "Tuscaloosa County – Hunting and Timber Invest"; echo $html =mb_convert_encoding($text, 'UTF-8');

    评论

报告相同问题?