thebopps5 Posted October 12, 2010 Share Posted October 12, 2010 I have a php app I am writing for our employees to write up the repairs they are doing. One of the fields in the tickets table is ticket_description (VARCHAR, length: 1000). They often skip to new paragraphs in the description, when explaining multiple items. When they submit the ticket, it is successfully inserted into the DB. When I look at the tickets in phpmyadmin, the formatting is correct, it includes carriage returns. When I output this field using php, it does not include the carriage returns, it is just the description all on one line. Any idea? Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted October 12, 2010 Share Posted October 12, 2010 nl2br() is what you'll need to convert the \n linebreaks to html <br> linebreaks. Quote Link to comment Share on other sites More sharing options...
thebopps5 Posted October 12, 2010 Author Share Posted October 12, 2010 awesome, worked perfectly! thanks very much! Quote Link to comment 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.