Re: How do I display new lines in a textearea?
| From: | CPT John W. Holmes | Date: | Thu, 05 Jun 2003 14:32:23 +0000 |
| Subject: | Re: How do I display new lines in a textearea? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-150362@lists.php.net to get a copy of this message | ||
> I want to have a textarea that contains details read from a mysql table,
> but I want to echo each row so that it is on a new line. What is the
> "new-line" character for a textarea? ( in effect the reverse of nl2br()
A newline is \n
$text = "word\nword\nword\n";
echo "<textarea>$word</textarea>";
will have each "word" on a different line.
---John Holmes...