Re: new lines in textareas?

From: Date: Sun, 30 Mar 2008 04:28:59 +0000
Subject: Re: new lines in textareas?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-272299@lists.php.net to get a copy of this message
On Sat, Mar 29, 2008 at 9:26 PM, Mary Anderson <maryfran@demog.berkeley.edu> wrote: > Hi all, > I have a php script which produces text which is to be displayed in > a textarea. I have the wrap for the text area set to 'hard'. I need to > have newlines inserted in the text. > "\n" and "<br>" don't work. They just get quoted literally > in the > text. I suspect I need to use htmlspecialchars , but don't know what > special character to feed it. > > Apologies if this should go to an HTML forum. I checked several > archives and did not find anything useful. (They tended to tell me to > put in \n or <br>!) > > Thanks > > Mary Anderson > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > \n, or just a plain line break, should work. <?php echo '<textarea>Hello, My favorite color is blue. Signed, Me!'; ?> Should work. -Casey

« previous php.general (#272299) next »