Hello:
I'm trying to make something up that will let me display multiple rows with three columns from the results of a mysql query. This works but there is a problem in the case where the table gets busted incase there are not enough results to complete the table. Say in the last row there are to be three columns but there are only enough results to make two volumes. How do I make it so it throws in the missing <td> </td>?
for($i=0;$i<$SQLRecordSetRowCount;$i++){
if($i % 3 == 0) {
echo "<tr>\n";
}
echo "<td>$Name</td>\n";
if(($i % 3) == (3 - 1) || ($i + 1) == $SQLRecordSetRowCount) {
echo "</tr>\n";
}
}
I hope someone can help me out.
Thanks!