Forum Moderators: coopster

Message Too Old, No Replies

line breaks mysql and php - help!

line breaks, mysql, php, nl2br() function

         

beebob1

11:41 am on Aug 13, 2008 (gmt 0)

10+ Year Member



Hi, im calling data from mysql with php as below:

echo "Text: ".$row['text'];

The database stores line break but i need to fugure out how to display these as currently its just one long string of text in the browser.

I dont know much php but i understand the nl2br() function can do this, how do you apply it?

Sekka

1:28 pm on Aug 13, 2008 (gmt 0)

10+ Year Member



echo "Text: ".nl2br($row['text']);

beebob1

1:47 pm on Aug 13, 2008 (gmt 0)

10+ Year Member



thanks works a treat. Problem solved! Now onto another one..