如何删除 (隐藏)和下面文本中的空格但是
<br>标签我测试过:
trim($string)=>没工作str_replace(' ', '', $string)=>没工作我使用了一些正则表达式=>没有工作
<br>????? ????: ?????? ?? ???? ??? ????
Run Code Online (Sandbox Code Playgroud)更新:
谢谢
最终解决方案:
$string = htmlentities($string, null, 'utf-8');
$string = str_replace(" ", "", $string);
Run Code Online (Sandbox Code Playgroud)