How I can display the data in tr depending on the number of characters.
my code is:
<?php
$query = "select text from mytable where id=".$_POST["id"];
$result = mysql_query($query);
$row=mysql_fetch_row($result);
?>
<table>
<tr class="text-center border">
<td><?php echo $row[0]; ?></td>
</tr>
<tr class="text-center border">
<td></td>
</tr>
<tr class="text-center border">
<td></td>
</tr>
</table>
if the text exceeds I want to show in the other row tr.
You might wanna have a look at
str_split
This way you'll just slice your value into as many parts of your desired length (20 chars in my example) as it takes and output them into table rows in a loop.