On 6/24/07, nitrox . <c3.nitrox@xxxxxxxxxxx> wrote:
hi all, I have a news section on a website that im coding that isnt displaying properly. Every paragraph in each news post is being displayed as one big paragraph. how can i display my paragraphs in proper form? The field the news story is stored in is set as longtext. here is a link to view. http://area51.chalkthree.com/index.php?pg=3 the first update shows what im having an issue with. each item in the numbered list should be on a seperate line. there are some line breaks as well for new paragraphs that arent displaying properly. here is the code i have: while($myrow = mysql_fetch_array($newsresults)) { print "<br>"; print $myrow['news_topic']; print " "; print $myrow['news_author']; print " "; print $myrow['topic_date']; print "<br>"; print $myrow['news_message']; print "<br>\n"; }
nl2br() as found at http://php.ca/nl2br, as well as the other functions on that page. Works well - although you may to futz a little bit with the variations on break tags. Cheers - Miles Thompson