PowersWithin Posted August 3, 2007 Share Posted August 3, 2007 I have stored data into mySQL through a multiple lines textarea input. When I try to print it out using the echo() function it doesn't print multiple lines, so everything is on one line. How can I fix this? Thanks for your time in advance Link to comment https://forums.phpfreaks.com/topic/63160-solved-mysql-output-text-formatting/ Share on other sites More sharing options...
Daniel0 Posted August 3, 2007 Share Posted August 3, 2007 It does print the lines... it's just that a browser sees the lines as whitespace and therefore ignores it. You need to use HTML line breaks (<br />). Use the nl2br() function for that. Link to comment https://forums.phpfreaks.com/topic/63160-solved-mysql-output-text-formatting/#findComment-314800 Share on other sites More sharing options...
PowersWithin Posted August 3, 2007 Author Share Posted August 3, 2007 Thank you! It worked perfectly Link to comment https://forums.phpfreaks.com/topic/63160-solved-mysql-output-text-formatting/#findComment-314803 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.