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 Quote 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. Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.