Re: Formatted text from mySQL DB
| From: | CPT John W. Holmes | Date: | Tue, 05 Aug 2003 13:25:37 +0000 |
| Subject: | Re: Formatted text from mySQL DB | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-158275@lists.php.net to get a copy of this message | ||
From: "PHPSpooky" <phpspooky@mjimm.com>
> When I create any field and let data be sent into my mySQL DB through
> it.. it goes ok. But when I retrieve it.. the data comes completely
> unformatted.
Ah, this question again. Has it been four days already?
HTML does not render new lines. Have a look at the source code of your page
and you'll see that the text is indeed on separate lines. HTML only
understands something like <br />, though, to go to a new line. So, you need
to replace the new line characters with HTML breaks in order to maintain
appearance.
www.php.net/nl2br
---John Holmes...