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" <[EMAIL PROTECTED]>
> Date: Tue, 16 Apr 2002 09:46:43 +0100
> To: "PHP LIST" <[EMAIL PROTECTED]>
> 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: [EMAIL PROTECTED] (daytime)
>   [EMAIL PROTECTED] (evening)
> 
> -----------------------------
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to