Re: Line breaks...
| From: | Richard Baskett | Date: | Tue, 16 Apr 2002 08:48:26 +0000 |
| Subject: | Re: Line breaks... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-93150@lists.php.net to get a copy of this message | ||
Don't use nl2br on the data before it goes into the database. Only use it
when you are showing that data as html. That way when you pull it into a
textfield you will not have to worry about the <br />
Rick
It is very nearly impossible . . . to become an educated person in a country
so distrustful of the independent mind. - James Baldwin
> From: "Philip Jeffs" <mail@philipjeffs.com>
> Date: Tue, 16 Apr 2002 09:46:43 +0100
> To: "PHP LIST" <php-general@lists.php.net>
> Subject: [PHP] Line breaks...
>
> Hi,
>
> I have a form inserting data into a database. I'm using nl2br to add <br> to
> the data enetered where appropriate.
> The data is then pulled out of the database and inserted into text fields for
> editing.
>
> Can anyone tell me how to remove the <br> tags while maintaining the line
> breaks in the text field?
>
> Thanks,
>
> Phil
> -----------------------------
>
> Philip Jeffs
>
> The Tickle Group
> The Gate House
> Summerseat
> Bury
> Lancashire
> BL9 5PE
> United Kingdom
> W: http://www.tickle.co.uk
> T: 01706 823456
> F: 01706 829500
> E: phil@tickle.co.uk (daytime)
> mail@philipjeffs.com (evening)
>
> -----------------------------
>
>