grippat Posted January 23, 2008 Share Posted January 23, 2008 I have a form which contains a <textarea> element where people are supposed to type several paragraphs. I then use PHP to save this element's contents to a MySQL database. When I use PHP to display the textarea's contents from the database on another page the line breaks have all been removed. Is there a way I can tell PHP or MySQL to preserve the line breaks so the text is in paragraphs? Link to comment Share on other sites More sharing options...
grippat Posted January 23, 2008 Author Share Posted January 23, 2008 Nevermind, just found the answer myself: the nl2br() function Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.