4
I have a table that has to have 3 columns per row. The data of the 3 columns I take from the database. My problem is that when I display 3 columns, I want the next results to appear in the bottom rows, ie, display 3 by 3, only I’m not getting it, because the code I made it displays 2 and the bottom row 1 and so on.
<table border="0" width="650">
<?php
$i = 1;
while($data2 = mysql_fetch_array($SQLContentCalendario)){
echo ($i % 3) ? '' : '<tr>';
echo '<td valign="top" width="200">';
...
echo '</td>';
echo ($i % 3) ? '' : '</tr>';
$i++;
}
?>
</table>
Thanks, solved!
– Alisson Acioli