Page 1 of 1

line breaks pulled from the database

Posted: Fri Sep 01, 2006 6:45 am
by rsmarsha
I am building a mailing list setup and am having a small problem.

If i input

line 1
line 2

into a text area it inputs into the database fine. When i edit the message in the test area it shows as 2 lines, and in the mail thats sent it also shows as 2 lines.

When i pull the information from the database to display into a table showing all the lists, it doesn't show the line break. Any idea why this happens and could you point me in the right direction to fix it?

Posted: Fri Sep 01, 2006 6:49 am
by Jenk
browsers don't render line breaks as line breaks, if you view source they will be there..

nl2br() to the rescue.