Formatting text from a MySQL DB
| From: | Ben Weinberger | Date: | Fri, 29 Sep 2000 02:47:34 +0000 |
| Subject: | Formatting text from a MySQL DB | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-17990@lists.php.net to get a copy of this message | ||
Hi~
I'm storing text in a MySQL database and then displaying it on a web page by calling it through PHP. The text needs to be able to be formatted with HTML code-- i.e. My MySQL entry might look like:
This is my <B>Text.... I am testing my</b> text to see if <I> it works</i>.
This is a test... test test test... test...
Testing 1234 1234....
I want the bold and italic formatting to carry through to my web page... and I need to spacing to carry as well. I tried using the "pre" tag in HTML-- but then the HTML formatting doesn't work. How do I display the information from my database and keep the spacing and HTML formatting?
Thanks,
-Ben