hi,
i got problem in wordwrap tetxarea
this textarea fetching from database
PHP:--------------------------------------------------------------------------------
$query = "SELECT text FROM t_emp ";
$result = mysql_query($query) or die("Query failed: Fetch all rows");
//textarea in form
code:--------------------------------------------------------------------------------
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1 width=100% name="rsTable" id=rsTable cols=11>
<td align="center">
<textarea name="text" style="width:100px:" class="mybar" id="tar" cols="20" rows="1" onfocus="tarea();" onblur="tarea();" title=""></textarea>
</td>
PHP:--------------------------------------------------------------------------------
<? while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$output = wordwrap($line['text'], 15,"\n", 1);?>
//printing in form
<td align="center"><div style="width:100px:"><?echo "$output\n";?></div></td>
let say i type some text in textarea
$text = "The quick brown fox jumped over the lazy dog.";
but as result im not getting any change it prints the whole line no wordwrap is working is there error in table width=100% and textarea width=100px as i m having 11 cols in form and i used px only in textarea is this is right way
whast the diff. between px and %
i want something like example2 in the link
http://www.php.net/manual/en/function.wordwrap.php
is some width i have to change in below width of cols
<tr bgcolor="#cccccc">
<th nowrap>Datum</th>
<th nowrap>Von</th>
<th nowrap>Bis</th>
<th nowrap>Kunde</th>
<th nowrap>Projekt</th>
<th nowrap>H-Vorgang</th>
<th nowrap>U-Vorgang</th>
<th nowrap>Text</th>
<th nowrap>IST</th>
<th nowrap>Soll</th>
<th nowrap>Status</th>
<th nowrap> </th>
</tr>
thanks for understanding