Page 1 of 1

formatting a paragraph from a MySQL text field

Posted: Mon Aug 06, 2007 7:50 pm
by ddevitt
Hi everyone,

i'm new to the php and these boards. I have a text field in my database. It was converted from a excel spreadsheet into a MySQL text field. My issue is that I need to format this chunk of copy into a paragraph. ColdFusion has a ParagraphFormat() function that takes care of it. Is there a similar function in PHP? Any help is greatly apprecieated!

dave

Posted: Mon Aug 06, 2007 7:53 pm
by John Cartwright
You mean you want to convert new line characters to line breaks?

nl2br()

Posted: Mon Aug 06, 2007 7:54 pm
by feyd