note 37384 added to language.operators.comparison
| From: | xhenxhe at rn2 dot php dot net | Date: | Wed, 12 Nov 2003 23:27:34 +0000 |
| Subject: | note 37384 added to language.operators.comparison | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-60324@lists.php.net to get a copy of this message | ||
This operator is very is usefull and will save you time and lines once you get the hang of it. Try
this next time you are looping through rows in a table and want to change the bgColor:
<table border=1 width=100% align=center style="border-collapse: collapse"
bgColor="lightblue">
<tr>
<td>Column 1</td>
<td>Column 2</td>
<td>Column 3</td>
<td>Column 4</td>
</tr>
<?
while ($i++ < 10)
{
$rbg = $rbg=="#EEEEEE" ? "#FFFFFF" : "#EEEEEE";
?>
<tr bgColor="<?=$rbg?>">
<td>Cell 1-<?=$i?></td>
<td>Cell 2-<?=$i?></td>
<td>Cell 3-<?=$i?></td>
<td>Cell 4-<?=$i?></td>
</tr>
<? } ?>
</table>
----
Manual Page -- http://www.php.net/manual/en/language.operators.comparison.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37384
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37384&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37384&report=yes
Search -- http://master.php.net/manage/user-notes.php