Forum Moderators: coopster
Can anybody see what might be causing the extra blank result in the code below:
$columns = 3;
echo "<TABLE BORDER=\"0\">\n";
for($i = 0; $i < $row; $i++) {
$row = mysql_fetch_array($result);
if($i % $columns == 0) {
//if there is no remainder, we want to start a new row
echo "<TR>\n";
}
echo "<TD><p><a href=\"/member-" . $row['id'] . ".php\">" . $row['id'] . "</a></p><br></TD>\n";
if(($i % $columns) == ($columns - 1) ¦¦ ($i + 1) == $row) {
//if there is a remainder of 1, end the row
//or if there is nothing left in our result set, end the row
echo "</TR>\n";
}
}
echo "</TABLE>\n";
}
Thanks for any feedback!
Try this - [us2.php.net...] - Hopefully that's ok since it's not a personal url :) There's an example for the loop just above the Notes section.