我有这个PHP代码PHP去除黑新线路
$Text=htmlspecialchars($_POST['new_post'],ENT_QUOTES);
$Text=trim($Text);
Text
是可变的,由user.If text
定义的
There is a pleasure in the pathless woods,
There is a rapture on the lonely shore,
There is society, where none intrudes.
我希望它留样that.But如果Text
是
By the deep Sea, and music in its roar:
I love not Man the less, but Nature more,
From these our interviews, in which I steal
我希望它是
By the deep Sea, and music in its roar:
I love not Man the less, but Nature more,
From these our interviews, in which I steal
我该如何用PHP实现?
的可能的复制[?我如何删除文本在PHP中的空行] (http://stackoverflow.com/questions/709669/how-do-i-remove-blank-lines-from-text-in-php) – Script47
我做到了,但它没有奏效。@ Script47 –
向我们展示你的html输出 – Takarii