Re: Re: textarea new line
| From: | David T-G | Date: | Thu, 23 Jan 2003 15:32:10 +0000 |
| Subject: | Re: Re: textarea new line | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-132843@lists.php.net to get a copy of this message | ||
Adi, et al --
I somehow missed the original message. Odd...
..and then Neil M said...
%
% Adi wrote:
% >i want to add in textarea a string with new line tag in it. how to do that?
% >
% >my try:
% >$string="-line1n\ -line2 n\-line3";
% >echo "<br><textarea name='aria' cols='50'
rows='2'>$string</textarea>";
Did you type this from memory or paste it in? You have n\ instead of the
backslash before the n. I think that
$string="-line1\n-line2\n-line3" ;
would give you the line breaks you want.
HTH & HAND
:-D
--
David T-G * There is too much animal courage in
(play) davidtg@justpickone.org * society and not sufficient moral courage.
(work) davidtgwork@justpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur
Pbzzhavpngvbaf Qrprapl Npg!