almightyegg Posted July 27, 2009 Share Posted July 27, 2009 My information is stored in MySQL database. An example of such data would be: "Here is a line of writing, here is another and here is a line break" This is stored correctly, but when echoing it out it would display: "Here is a line of writing, here is another and here is a line break" Question is how can I get this display correctly? Quote Link to comment Share on other sites More sharing options...
almightyegg Posted July 27, 2009 Author Share Posted July 27, 2009 Oh yeah, it is also being inserted into the db through a textarea, if that makes any difference? Quote Link to comment Share on other sites More sharing options...
ldougherty Posted July 27, 2009 Share Posted July 27, 2009 You will want to use the nl2br function. http://us3.php.net/manual/en/function.nl2br.php This will return the output with line breaks. Quote Link to comment Share on other sites More sharing options...
almightyegg Posted July 27, 2009 Author Share Posted July 27, 2009 thank you 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.