Welcome to WebmasterWorld Guest from 54.226.67.166

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

how to put diffentent sentence into differnt rows in TextArea

how to put diffentent sentence into differnt rows in TextArea

     

xbl01234

5:03 am on Dec 20, 2006 (gmt 0)

5+ Year Member



Hello;
how to put diffentent sentence into differnt rows in TextArea? please.

For eaxmple, i will select all data about topic from database, and display them onto a TEXTAREA. But i want the different topics into different rows. How i can do that? Thanks.

<form>
<TEXTAREA cols="50" rows="10" wrap=off>

<?
while($row = mysql_fetch_array($result))
echo $row['Topic'];
?>

</TEXTAREA>
</form>

rover

5:14 am on Dec 20, 2006 (gmt 0)

10+ Year Member



Couldn't you just use the new line \n?

<form>
<TEXTAREA cols="50" rows="10" wrap=off>

<?
while($row = mysql_fetch_array($result))
echo $row['Topic'];
echo "\n";
?>

</TEXTAREA>
</form>

xbl01234

5:27 am on Dec 20, 2006 (gmt 0)

5+ Year Member



it does not work, i tried the <br> also, but it doesn't help. Thanks anyway

xbl01234

5:58 am on Dec 20, 2006 (gmt 0)

5+ Year Member



>Couldn't you just use the new line \n?
><form>
><TEXTAREA cols="50" rows="10" wrap=off>

><?
>while($row = mysql_fetch_array($result))
>echo $row['Topic'];
>echo "\n";
>?>

></TEXTAREA>
></form>

Thanks Rover, i put the new line and the topic in a same line, then it does the work. like the following;

echo $row['Topic'] . "\n";

 

Featured Threads

Hot Threads This Week

Hot Threads This Month