advancedfuture Posted January 8, 2008 Share Posted January 8, 2008 So I am trying to output the data from a certain field in my database which has user uploaded content. Now I can do a query in mysql and see the paragraph/line breaks. But when I output the data it just puts it in one giant block of text... how do I go about rendering the paragraph breaks? Quote Link to comment https://forums.phpfreaks.com/topic/84960-solved-rendering-linebreaks-from-database-output/ Share on other sites More sharing options...
papaface Posted January 8, 2008 Share Posted January 8, 2008 try echo nl2br($string); Quote Link to comment https://forums.phpfreaks.com/topic/84960-solved-rendering-linebreaks-from-database-output/#findComment-433220 Share on other sites More sharing options...
advancedfuture Posted January 8, 2008 Author Share Posted January 8, 2008 that function was exactly what I was looking for! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/84960-solved-rendering-linebreaks-from-database-output/#findComment-433221 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.