formatting a paragraph from a MySQL text field

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ddevitt
Forum Newbie
Posts: 1
Joined: Mon Aug 06, 2007 7:43 pm

formatting a paragraph from a MySQL text field

Post 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
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

You mean you want to convert new line characters to line breaks?

nl2br()
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Post Reply