note 37979 added to language.operators.comparison
| From: | mina86 at tlen dot pl | Date: | Wed, 03 Dec 2003 20:03:18 +0000 |
| Subject: | note 37979 added to language.operators.comparison | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-61357@lists.php.net to get a copy of this message | ||
I guess quicker method would be:
<?php
$colors = array('#EEEEEE', '#FFFFFF');
while ($i++ < 10) {
?>
<tr bgColor="<?=$colors[$i%2]?>">
<td>Cell 1-<?=$i?></td>
<td>Cell 2-<?=$i?></td>
<td>Cell 3-<?=$i?></td>
<td>Cell 4-<?=$i?></td>
</tr>
<?php } ?>
And you can easily add more colors:
<?php
$colors = array('#EEEEEE', '#FFFFFF', '#DDDDDD', '#CCCCCC');
while ($i++ < 10) {
?>
<tr bgColor="<?=$colors[$i%4]?>">
<td>Cell 1-<?=$i?></td>
<td>Cell 2-<?=$i?></td>
<td>Cell 3-<?=$i?></td>
<td>Cell 4-<?=$i?></td>
</tr>
<?php } ?>
----
Manual Page -- http://www.php.net/manual/en/language.operators.comparison.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37979
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37979&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37979&report=yes
Search -- http://master.php.net/manage/user-notes.php