whoathere Posted August 13, 2007 Share Posted August 13, 2007 I'm collecting user input from a <textarea> element, saving it in a database, and displaying it later. How do I preserve line returns that the user types so that they'll display later? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/64598-solved-return-character/ Share on other sites More sharing options...
Fadion Posted August 13, 2007 Share Posted August 13, 2007 From textarea to database u have \n as new lines. To display those new lines back use <a href="http://www.php.net/nl2br">nl2br()</a> Quote Link to comment https://forums.phpfreaks.com/topic/64598-solved-return-character/#findComment-322080 Share on other sites More sharing options...
whoathere Posted August 13, 2007 Author Share Posted August 13, 2007 Awesome, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/64598-solved-return-character/#findComment-322085 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.