Convert line breaks to HTML <br> tags?

  • Thread starter Thread starter skinnypspplayer
  • Start date Start date
S

skinnypspplayer

Guest
On one of my webpages, I use PHP to grab some MySQL data and put it on the page. The problem is that one of the data areas for MySQL has multiple paragraphs with ordinary line breaks. When this gets posted onto the webpage, it just turns out to be a giant wall of text. I need a way that I can convert the ordinary line breaks into <br> tags so it will be multiple paragraphs instead of just one huge one.

Here's where the huge wall of text is (and where I need to convert line breaks at)..

http://www.kingps3.com/arttemp.php?id=103


The code for posting the MySQL data to the page is..

<p align="left">
<?php
echo $row['articletext'];
?>
</p>

The $row['articletext'] pulls out the data but I need it to convert line breaks to <br> tags. Thanks for any help!
 


Write your reply...
Back
Top