I'm trying to loop in a table row 16 times with 2 elements of array. I know I can't loop 16 times with 2 elements of data but I want to display a table which has 16 row and only first 2 row will have data and others will leave blank. Same as the image below
I have tried this code but its not what I want
<th>No</th>
<th>Id</th>
<th>Name</th>
for($i=1; $i<=16; $i++)
{
<tr>
<td> echo $i </td>
foreach($array as $a){
<td> $a->id </td>
<td> $a->name </td>
}
</tr>
}
