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? Link to comment https://forums.phpfreaks.com/topic/167557-solved-value-displays-differently-to-how-stored/ 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? Link to comment https://forums.phpfreaks.com/topic/167557-solved-value-displays-differently-to-how-stored/#findComment-883553 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. Link to comment https://forums.phpfreaks.com/topic/167557-solved-value-displays-differently-to-how-stored/#findComment-883558 Share on other sites More sharing options...
almightyegg Posted July 27, 2009 Author Share Posted July 27, 2009 thank you Link to comment https://forums.phpfreaks.com/topic/167557-solved-value-displays-differently-to-how-stored/#findComment-883564 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.