Posted by Charlie King on 01/15/06 18:22
On 15 Jan 2006 04:57:20 -0800, in
<1137329840.465536.212360@z14g2000cwz.googlegroups.com>
(comp.lang.php) "monomaniac21" <marcrice20@msn.com> wrote:
> Hi all
>
> On my site I get users to enter a load of information in a textarea
> box, however when i save this data to my mysql DB and then retrieve it,
> it comes out without all the formatting, like new paragraphs and new
> lines.
>
> Can anyone tell me how you can capture the data entered into such a
> field with all the formatting the user has entered like new paragraphs
> etc?
You could try nl2br();
http://fr.php.net/manual/en/function.nl2br.php
e.g.
echo nl2br($bigFieldFromDatabase);
--
Charlie
[Back to original message]
|