Welcome to WebmasterWorld Guest from 54.197.66.254

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

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

Full Member

10+ Year Member

joined:Jan 25, 2006
posts:206
votes: 0


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)

Full Member

10+ Year Member

joined:Jan 5, 2004
posts:202
votes: 0


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)

Full Member

10+ Year Member

joined:Jan 25, 2006
posts:206
votes: 0


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)

Full Member

10+ Year Member

joined:Jan 25, 2006
posts:206
votes: 0


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

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members