Trevor Gryffyn wrote:
Two options:
1. nl2br($posteddata) - This converts all the \r\n's to <br>'s so that
it comes out with the same carriage returns as the person who inputed it
gave it
It doesn't change \r\n to <br>, it only changes \n to <br />
2. Use HTML "<pre>" tabs to do the same thing.
I think that's the trickiest thing about using textarea to input then
regurgitate the data. Everything else should come out pretty much the
same.
-TG
-----Original Message-----
From: Brent Clements [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 11, 2004 7:02 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Convert textarea post data from plain text to
html using php..how?
Do you guys happen to have an easy easy to do this?
I need to convert plain text submitted via a textarea form
field to html formatted text.
Is there a way to do this with php?
Thanks,
Brent
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php