PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi
I’ve just developed a php page that gets texts from a mysql database and displays them on the site, but my problem is that it doesn’t show the paragraphs I make.
The texts are uploaded to the database with a form.
Basically, you are experiencing that newlines are not displayed? It's a very common problem and it's because html is rendered differently than plaintext. The easiest solution would be to use http://www.php.net/nl2br before you output the data...
How do i use nl2br ?
I have a form that sends the text to the database, must i apply the nl2br in that form, or only in the php page that displays the text?