note 26426 deleted from control-structures.for by tomsommer
| From: | tomsommer@php.net | Date: | Thu, 05 Aug 2004 18:17:26 +0000 |
| Subject: | note 26426 deleted from control-structures.for by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-74062@lists.php.net to get a copy of this message | ||
Note Submitter: kristoffer at caveo dot se
----
This didnt fit anywhere and i havent seen it before so i posted it here. Its a simple for loop for
doing tables.
cheers
Kristoffer
<TABLE border="1">
<?
$cols = 5;
$i = $cols;
$j = 0;
for ($k = 0; $k < 50; $k++) {
if ($i == $cols) {
echo "<TR>\n";
$i = 0;
}
echo "\t<TD>Empty Cell</TD>\n";
$j++;
if ($j == $cols) {
echo "</TR>\n";
$j = 0;
}
$i++;
}
?>
</TABLE>