masugidsk8r 0 Report post Posted March 4, 2007 I have a MySQL database which stores articles. A sample article would look like this: This is a body. This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body. That's how it's displayed in the MySQL Database. Currently the data type is "TEXT". But when I load it on a php page to display that same article, it would show the same data but wouldn't have separate paragraphs. How would I be able to display the text in separate paragraphs? Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted March 4, 2007 On the php.net site, search for htmlentities() and nl2br(), the functions which converts potentially dangerous and damaging code tags from their 'regular' form into a format which is not dangerous nor damaging and there are others I am sure . Finding these functions and following the links in those descripptions will lead you to other functions to use, too. The original data contains internal characters for tabs, carriage returns, new lines, etc, so the data needs to be altered from its source, to some thing safe. Use functions like these to do the cleansing. Then, when you remove the data from the database and proceed to print it or display it, the product looks the same as when it went in. http://php.net/ Share this post Link to post Share on other sites
masugidsk8r 0 Report post Posted March 4, 2007 Thx man, that really worked. Share this post Link to post Share on other sites