rakan_dr
June 2nd, 2008, 09:56 PM
hello everyone,
I want your help in a PHP script.
I made like comment page for visitors to comment on articles but sometimes people write a big line which deform the look of the page. So how can I make a fixed number of characters for the script that displays the comments so when a visitor write a line its characters more than the fixed number the script puts a break automatically???
this is the code i use:
<table width="800" border="0" align="right" cellpadding="0" cellspacing="0" class="table">
<?php do { ?>
<tr>
<td width="800"><div align="right" class="style17">
<p>
<?php
echo $row_chat['comment'];
?>
</p>
<p align="center" class="style13">- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </p>
</div></td>
</tr>
<?php } while ($row_chat = mysql_fetch_assoc($chat)); ?>
</table>
so if someone writes "44444444444444444444444444444444444444444444444444 44444444444444444444444444444444444444444444444444 44444444" the script divides it into pieces.
Thanks
I want your help in a PHP script.
I made like comment page for visitors to comment on articles but sometimes people write a big line which deform the look of the page. So how can I make a fixed number of characters for the script that displays the comments so when a visitor write a line its characters more than the fixed number the script puts a break automatically???
this is the code i use:
<table width="800" border="0" align="right" cellpadding="0" cellspacing="0" class="table">
<?php do { ?>
<tr>
<td width="800"><div align="right" class="style17">
<p>
<?php
echo $row_chat['comment'];
?>
</p>
<p align="center" class="style13">- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </p>
</div></td>
</tr>
<?php } while ($row_chat = mysql_fetch_assoc($chat)); ?>
</table>
so if someone writes "44444444444444444444444444444444444444444444444444 44444444444444444444444444444444444444444444444444 44444444" the script divides it into pieces.
Thanks