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. :) Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment 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);:) Quote Link to comment 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.