replace   characters that are hidden in text

后端 未结 4 547
傲寒
傲寒 2020-12-07 13:35

How to remove   (that are hidden) and SPACES in below text but

  • hold UNICODE characters
  • hold
    tag
4条回答
  •  悲&欢浪女
    2020-12-07 13:55

    This solution will work, I tested it:

    $string = htmlentities($content, null, 'utf-8');
    $content = str_replace(" ", "", $string);
    $content = html_entity_decode($content);
    

提交回复
热议问题