PDA

View Full Version : how to display copy correctly??


kred
09-08-2004, 02:09 PM
Good day,

I'm setting up an admin section for a news release page. with a mysql DB to store the info(Date, Title, & Copy). --all working fine--

how can I get the copy(usually more than a paragraph) to keep the paragraph breaks and not lump it into 1 long paragraph, and without having the admin user putting in html tags.

any help would be great

Thanks
Ken

firepages
09-08-2004, 02:36 PM
nl2br() (http://www.php.net/nl2br) :D

kred
09-08-2004, 02:54 PM
thanks

4xz
09-08-2004, 08:31 PM
nl2br() rules :D

Saves u a preg_replace("/\n/","<br />", $input); ;-)