I am seriously struggling to grasp my head around the following. I want to build a 3 data cell per row table based on an PHP array. So in other words, if there is 3 values in the array, there should be a structure like:
<?php
$arr = array("value1","value2","value3");
?>
// Expected outcome:
<table>
<tr>
<td>value1</td>
<td>value2</td>
<td>value3</td>
</tr>
</table>
but should a 4th value be added to the array, it must dynamically create another row so in other words:
<?php
$arr = array("value1","value2","value3","value4");
?>
// Expected outcome:
<table>
<tr>
<td>value1</td>
<td>value2</td>
<td>value3</td>
</tr>
<tr>
<td>value4</td>
<td></td>
<td></td>
</tr>
</table>
I really don't mind which solution, even a mix between php and jQuery, but just something I can use to achieve the above.