[英]Remove ¶ from string with php
我想從字符串中刪除¶段落標記。 我已經嘗試了strip_tags和preg_replace,但是沒有用。 該字符串位於mysql記錄中。 在將其保存到數據庫中之前以及在顯示它之前,我曾嘗試將其刪除,但似乎無濟於事。
任何幫助表示贊賞。
用¶顯示您的真實字符串,因為這非常有用:
<?php
$string = 'Hi¶ this is a string with a paragraph¶';
$string = str_replace( "¶", "", $string );
echo $string;
?>
輸出量
Hi this is a string with a paragraph
這對我有用
$mystring = preg_replace( '/\s+/', ' ', $mystring);
刪除字符串中的白色間距
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.