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.
精彩评论