Welcome to WebmasterWorld Guest from 54.161.201.189

Forum Moderators: coopster & jatar k

how to put diffentent sentence into differnt rows in TextArea

how to put diffentent sentence into differnt rows in TextArea

   
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>

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>

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
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

My Threads

Hot Threads This Week

Hot Threads This Month