That's right but if the variable is initialised by the form and you want to
write the variable in to your html-document it's better to write this

$content = nl2br(htmlentities(stripslashes($content)));

----- Original Message -----
From: "Martin Clifford" <[EMAIL PROTECTED]>
Sent: Wednesday, July 17, 2002 3:15 PM
Subject: Re: [PHP-DB] TEXTAREA ...

$content = nl2br($content);

That will convert all newline characters into <br> tags.


Martin Clifford
Developer's Forums:

>>> Josť Moreira <[EMAIL PROTECTED]> 07/17/02 09:15AM >>>
hello ... im sorry to bother with a non-db question but i searched for this
and got 0 record :P

its all about the wrappig in textareas:

how can i convert the end of line/ line breaks ['enter' keys] that the user
hits while
filling a textarea so that when i display the record content the text does
break where the user intended ???


<textarea>bla blah blah
                 bla blah blah</textarea>

if i echo() this textarea value i will apear in a single line even if the
user pressed enter 2  break the line

PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to