Page 1 of 1

how to break line in Textarea

Posted: Wed Sep 27, 2006 5:59 am
by eshban
hi,


can anybody tell me that how to break line in textarea.

i m doing like this but it shows <br> as string.


<textarea name="recreation_programs" readonly rows="10" cols="35">

Code: Select all

<?
     $x = 0; 
    while($x < $no_of_dang_community){
        print $result_dang_community[$x]['recreation_programs'].'<br/>';
        $x++;
    }
?>
</textarea>

Output:


tryt <br/> rtyryry5464 <br/> dasdaaaaaaaaa <br/> dasdaaaaaaaaa <br/>

Posted: Wed Sep 27, 2006 6:03 am
by blacksnday
could be any of the below:

Code: Select all

\r\n
\n
\r

Posted: Wed Sep 27, 2006 6:06 am
by Rovas
Set a convient number of rows (5) and columns.
Read here more about the textarea tag http://www.w3schools.com/tags/tag_textarea.asp

Posted: Wed Sep 27, 2006 6:13 am
by eshban
i have already tried it

Code: Select all

\r\n
\n
\r
but it doesnot work

Posted: Wed Sep 27, 2006 6:18 am
by Benjamin

Code: Select all

<?php
     $x = 0;
    while($x < $no_of_dang_community){
        print $result_dang_community[$x]['recreation_programs'] . "\n";
        $x++;
    }
?>

Posted: Wed Sep 27, 2006 6:20 am
by blacksnday
edit... astions beat me :P

Posted: Wed Sep 27, 2006 6:26 am
by eshban
thnax budyy...................


it is working........................ nice.....


but wats the reason when i used single quote instead of double quote