On 4/5/06, David Doonan <[EMAIL PROTECTED]> wrote:
> The only difference is the textarea tag from the form. What am I
> missing?

"nl2br" is short for "newline to <br>".  If you pass a string of
content that contains newline characters (these signal the ending of a
line of text) to nl2br(), it will replace those newlines with <br>
tags, so that when outputted to the screen, you will see the line
breaks.

The reason why you "see" the line breaks when contained within the
<textarea /> tags is that browsers "honor" newline characters (and
other whitespace) when wrapped in <textarea />.  This is similar to
the <pre /> tags.

HTH,

John W

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

Reply via email to