note 26426 added to control-structures.for
| From: | kristoffer at rack1 dot php dot net | Date: | Wed, 30 Oct 2002 14:25:25 +0000 |
| Subject: | note 26426 added to control-structures.for | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38752@lists.php.net to get a copy of this message | ||
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>
--
http://www.php.net/manual/en/control-structures.for.php
http://master.php.net/manage/user-notes.php?action=edit+26426
http://master.php.net/manage/user-notes.php?action=delete+26426
http://master.php.net/manage/user-notes.php?action=reject+26426