[PHP] How do I display new lines in a textearea?
Hi 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() ) Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do I display new lines in a textearea?
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... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do I display new lines in a textearea?
Hi Thanks, I DID use \n, BUT, I made a stupid mistake, I did: textarea ?php echo $word.'\n'; ? /textarea And the literal ' did not parse the \n, replacing with works fine... On Thu, 2003-06-05 at 16:32, CPT John W. Holmes wrote: 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... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php