Page 1 of 1

[SOLVED]New Lines from db not showing up in HTML

Posted: Thu Jul 01, 2004 4:03 am
by anjanesh
I have a query which gets a filed $row['story'] that contains many newlines. But when displaying it as

Code: Select all

echo $row['story']
or

Code: Select all

echo htmlentities($row['story'])
somehow it displays it an an entire non stop string with no newlines etc.
Any idea how to get this fixed. Its like \n should be converted to <BR> ? Does this have to been done manually or some fn like htmlenties etc will do it ?
Thanks

Posted: Thu Jul 01, 2004 4:19 am
by Grim...
You need [php_man]nl2br[/php_man]().

[SOLVED]

Posted: Thu Jul 01, 2004 4:43 am
by anjanesh
Thanks
SOLVED