好吧,我已经尝试过这些,但似乎它们都不起作用,我的示例字符串是
$text_description=" Hello world! lorel ipsum";
$text_description= str_replace(" "," ",$text_description);
$text_description = preg_replace("/&#?[a-z0-9]+;/i"," ",$text_description);
$text_description=html_entity_decode($text_description);
Run Code Online (Sandbox Code Playgroud)
$text_description=" Hello world! lorel ipsum";
$text_description = str_replace(' ', ' ', $text_description);
echo $text_description;
Run Code Online (Sandbox Code Playgroud)
输出:
你好,世界!洛雷尔 ipsum
| 归档时间: |
|
| 查看次数: |
26813 次 |
| 最近记录: |