开发者

Show new lines and spaces?

I am coding a guestbook and I want new lines and sp开发者_运维知识库aces to be shown when I show the posts?

when I post a thread now everything is shown on one line.

help!


Use nl2br(). Basically it's prepending every newline character with <br />.


Use this function:

http://php.net/manual/en/function.nl2br.php

nl2br() will convert new lines into <br/> tags, so you will get new lines.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜