Re: carriage return/line break problem

From: Date: Mon, 26 Aug 2002 09:50:36 +0000
Subject: Re: carriage return/line break problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-114119@lists.php.net to get a copy of this message
Pag -- ..and then Pag said... % % At 16:46 24-08-2002 +0200, Bas Jobsen wrote: % >use nl2br($content); % % I assume i should use that function when sending to the page, Right; it will convert newlines to linebreaks. % after retrieving the text from the DB, right? Cant i do something when That's generally when one would do it. I tend to just use <pre> tags when I need to preserve line breaks rather than converting content, personally. % getting the text TO the db and then when i need it, i can just retrieve it, % ready to be put on the page? If you don't mind having HTML code in the database, then go ahead and convert it a la $content = nl2br($content) ; before writing it to the DB and then it will be that way when it comes out. % % Thanks. Sure thing! % % Pag HTH & HAND :-D -- David T-G * It's easier to fight for one's principles (play) davidtg@justpickone.org * than to live up to them. -- fortune cookie (work) davidtgwork@justpickone.org http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

« previous php.general (#114119) next »