onemind Posted July 24, 2006 Share Posted July 24, 2006 Hi,I have a text field in a mysql table and i output it to my page with php.The only thing is, the text outputs fine but it gets rid of all whitespace so there are no paragraphs ect and it looks like one big block of text.Is there any way to preserve the whitespace?Thanks for any info. :) Link to comment https://forums.phpfreaks.com/topic/15455-outputting-text-from-mysql-with-whitespace/ Share on other sites More sharing options...
localhost Posted July 24, 2006 Share Posted July 24, 2006 Use a WYSIWIG editor.http://www.google.com/search?hl=en&safe=off&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=wysiwyg+editor&spell=1 Link to comment https://forums.phpfreaks.com/topic/15455-outputting-text-from-mysql-with-whitespace/#findComment-62690 Share on other sites More sharing options...
onemind Posted July 24, 2006 Author Share Posted July 24, 2006 What?How will that possibly help?Maybe i want clear enough, i have a field in a mysql table of the "text" datatype.When i select a text object from the database and output it with php, the whitespace is gone.I remember there was a solution to this a while back. A certain php function that adds whitespace back to the original text. Link to comment https://forums.phpfreaks.com/topic/15455-outputting-text-from-mysql-with-whitespace/#findComment-62695 Share on other sites More sharing options...
onemind Posted July 24, 2006 Author Share Posted July 24, 2006 Its all good, i figured it out:echo nl2br($text);:) Link to comment https://forums.phpfreaks.com/topic/15455-outputting-text-from-mysql-with-whitespace/#findComment-62697 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.