...

View Full Version : echo(htmlspecialchars($message)); shows text in one complete line!



jasonc310771
08-07-2008, 02:16 AM
i have the following code which is showing all the text in a single line.

i have this in the variable...

lineone
linetwo
linethree


but then i echo the message prior to inserting in the DB


it shows like this...


lineone linetwo linethree


how do i display it like i typed it with line breaks

i have tried print, fprint and no luck with them

plz help

thanks in advance.

Nightfire
08-07-2008, 02:19 AM
nl2br() (http://php.net/nl2br) is what you're looking for



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum