Neo*_*eos 1 php mysql preg-replace str-replace
我想从字符串中删除段落标记.我已经尝试过strip_tags和preg_replace,但它不起作用.该字符串位于mysql记录中.我之前尝试将其删除,然后将其保存在数据库中并显示之前,但似乎没有任何效果.
任何帮助赞赏.
用显示你的真实字符串,因为这很有效:
<?php
$string = 'Hi¶ this is a string with a paragraph¶';
$string = str_replace( "¶", "", $string );
echo $string;
?>
Run Code Online (Sandbox Code Playgroud)
产量
Hi this is a string with a paragraph
Run Code Online (Sandbox Code Playgroud)