开发者

Ignore LINE BREAK

I have a code which I开发者_运维百科 extracted from a text file. Every character in the text file have been embedded into array including line breaks. I want to ignore the line breaks. I've tried so many ways but it fails.

Can you help me? :)


If you mean you have an array of lines ending with \n, you can remove them like so...

$line = rtrim($line, "\n");


Did you try

str_replace("\n", "", $text);

..?

http://ideone.com/rpQCq

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜