Forum Moderators: coopster

Message Too Old, No Replies

Storing textfield in db with formatting

White space is removed from text when stored..

         

rubenski

9:24 am on Aug 30, 2005 (gmt 0)

10+ Year Member



Hi,

I have a simple form that is stored to a mysql datbase, just like the one I am typing in now.

How can I make sure line breaks etc are stored with the text? Right now all text is stored as a single line even though line breaks are used.

I know there is a simpel PHP function that will to this, but I kind of forgot what is was and I don't know what to look for.

Hope you can help.

Thanks, Ruben

rubenski

9:30 am on Aug 30, 2005 (gmt 0)

10+ Year Member



Yikes, I already found it. nl2br() is my friend.