PDA

View Full Version : Parsing Line Breaks


SpeedStreet
03-27-2003, 08:57 PM
When I view data in a field in my database (A mediumtext field) it looks like this:


Test1
Test2
Test3


When I call it into a custom page I am creating, it looks like this:

Test1 Test2 Test3


How can I make the php parse the information correctly? I need those line breaks to help better organize my data.

Thanks in advance.

mr e
03-27-2003, 09:18 PM
nl2br() should work i think

Boofo
03-27-2003, 09:26 PM
Today at 05:18 PM mr e said this in Post #2 (https://vborg.vbsupport.ru/showthread.php?postid=374237#post374237)
nl2br() should work i think

What is "nl2br()"? I never heard of this. ;)

SpeedStreet
03-27-2003, 09:28 PM
It worked great!

http://www.php.net/manual/en/function.nl2br.php

Boofo
03-27-2003, 09:30 PM
So, exactly how would you use this in the line?

SpeedStreet
03-27-2003, 10:00 PM
Here's how I used it:

<?= nl2br ($sql_mechmods) ?>

mr e
03-27-2003, 10:40 PM
nl2br = new line to break