Try printing " " instead of "empty"; it should just give you a blank table entry if that's what you really want.
Also, it's putting a blank table row at the bottom of the table, so changing
PHP Code:
echo "<table border=\"1\" width=\"400\"><tr>";
for ( $x = 0; $x < count( $all ); $x++) {
for ( $y = 0; $y < count( $all[$x] ); $y++ ) {
echo "<td align=\"center\" width=\"$cellwidth\">" . $all[$x][$y] . "</td>";
}
echo "</tr>\n<tr>";
}
echo "</tr></table>\n<br>\n";
to
PHP Code:
echo "<table border=\"1\" width=\"400\">";
for ( $x = 0; $x < count( $all ); $x++) {
echo "<tr>";
for ( $y = 0; $y < count( $all[$x] ); $y++ ) {
echo "<td align=\"center\" width=\"$cellwidth\">" . $all[$x][$y] . "</td>";
}
echo "</tr>\n";
}
echo "</table>\n<br>\n";
should fix that.