How to store messages with newline and stuff?

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

Post Reply
myleow
Forum Contributor
Posts: 194
Joined: Mon Jun 21, 2004 7:05 pm
Location: California

How to store messages with newline and stuff?

Post by myleow »

I created a simple message system and store the textarea as string before storing it in DB. So when i retrieve it back from DB to display, i lose all the new line and stuff.

How do retain those properties like this board?

Regards
Mian
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

[php_man]nl2br[/php_man]
Post Reply