PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
wenquxing
Forum Newbie
Posts: 9 Joined: Thu Dec 02, 2004 12:17 am
Post
by wenquxing » Wed Dec 15, 2004 11:21 am
I am creating a web page to get news from mysql by using php, the problem is the original news format is like:
aaaa
aaaaaaaa
aaaaaaaaa
but when I get it from mysql, and display it on the web page, it comes like:
aaaaaaaaaaaaaaaa
aaaaaaaaaa
anyone can tell me how to keep the format the same as the original one?
thanks.
vigge89
Forum Regular
Posts: 875 Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden
Post
by vigge89 » Wed Dec 15, 2004 11:43 am
check out the [phpman]nl2br[/phpman]() function
wenquxing
Forum Newbie
Posts: 9 Joined: Thu Dec 02, 2004 12:17 am
Post
by wenquxing » Wed Dec 15, 2004 12:21 pm
thank you vigge89
now the problem is solved.