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 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> 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. Link to comment https://forums.phpfreaks.com/topic/64598-solved-return-character/#findComment-322085 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.