I have below code which is showing data in table td, Currently I am showing four table td but when I increase the no like 8 or 12 it is messing. I need to start a new row for every 4 td. How can I achieve this?
<tr style="background-color:white;">
<?php
while ($row = mysqli_fetch_array($rs_result)) {
// Display each field of the records.
?>
<td style="vertical-align:middle;padding-top:0px;margin-top:0px;width:32px"><img styel="height:32px;width: 32px;" src="<?php echo $row["gravator"]; ?>"/></td>
<td style="vertical-align:top;margin-left:10px;text-align:left !important;">
<!--<span><img src="<?php echo $row["gravator"]; ?>"/</span>-->
<span style="">#Ad id:<?php echo $row["id"]; ?></span><br>
<span style="margin-left:2px;border-top:1px solid blue;" class="node-text"><?php echo $row["fullname"]; ?> Has Added</span> <br>
<span style="position:absolute;margin-top:-15px;margin-left:2px;width:160px;" class="node-text"><a target="_blank" href="<?php echo $row["url"]; ?>"><?php echo $row["title"]; ?></a></span> <br>
<span style="position:absolute;margin-top:-26px;font-size:smaller;color:silver;margin-left:2px;" class="node-text">On <?php echo $row["datetime"]; ?></span>
</td>
<?php
};
?> </tr>