อยากให้แสดงข้อมูลจากตาราง ประมาณนี้ครับ สมมุตมีทั้งหมด 12record พอครบ 6 record ให้แสดงต่อแถวใหม่ครับ
นี้โค้ดที่ลองทำครับ คือมันจะต่อ 1 2 3 4 5 6 7 8 9 10 11 12.... ไปเรื่อยๆในแถวเดียวจนครบ record
อยากให้แสดงผลตามรูปข้างบนต้องเขียนโค้ดยังไงดีครับ
<table class="tg" width="100%">
<tr>
<th style="width: 17%" class="tg-031e"></th>
<th style="width: 17%" class="tg-yw4l"></th>
<th style="width: 17%" class="tg-yw4l"></th>
<th style="width: 17%" class="tg-yw4l"></th>
<th style="width: 17%" class="tg-yw4l"></th>
<th style="width: 17%" class="tg-yw4l"></th>
</tr>
<tr>
<?php
while ( $result = mysqli_fetch_array($CHRow ) ) {
?>
<td class="tg-yw4l">
<div class="box">
<h4 class="title"><?php echo $result['cat_name'] ?></h4>
</div>
</td>
<?php
}?>
</tr>
</table>