Okay, im writing a PHP message board application. I've inserted a message into my database (MySQL). This message was typed in a html form and POSTed to a php program. There happened to be blank lines in between paragraphs in this form. These blank lines now appear as a large whitespace in the database. However, when I try to output this back onto a webpage, HTML of course ignores whitespace and so the paragraphs and lines all seem to be bunched together.
So anyway I'm looking for a couple of pointers/pseudocode on how to properly output these line breaks from the database. I was thinking of coding an algorithm to replace X whitespace with a "<br>". This is messy and inefficient though. And I've never done string parsing like that with PHP 🙂
Any suggestions?