Converting Line Breaks
Moderator: General Moderators
-
thoughtriot
- Forum Commoner
- Posts: 26
- Joined: Thu Nov 07, 2002 9:32 pm
Converting Line Breaks
I'm using MySQL to make a little news blog. I have a field called Entry, and it's a text field. I was wondering if when I hit the Return key 2 times to make a space in between paragraphs, how I could make that line visible on the page where I display the news entries. Because other people update the news, and they don't know that you need to put <br>s in to make line breaks, so they use the return key, and then the breaks don't show up when the entries are displayed. How do I convert blank lines to <br>s so they show up in my php page?
http://www.php.net/manual/en/function.nl2br.php
Description
string nl2br ( string string)
Returns string with '<br />' inserted before all newlines.