homepage Welcome to WebmasterWorld Guest from 54.167.173.250
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
how to put diffentent sentence into differnt rows in TextArea
how to put diffentent sentence into differnt rows in TextArea
xbl01234




msg:3194171
 5:03 am on Dec 20, 2006 (gmt 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>

 

rover




msg:3194180
 5:14 am on Dec 20, 2006 (gmt 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>

xbl01234




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

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

xbl01234




msg:3194222
 5:58 am on Dec 20, 2006 (gmt 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";

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved