color rotator

to rotate the colors in a table without js.


echo "<_table>";
$bg1 = "#ffffff"; // background White
$bg2 = "#f2f0f0"; // background L-Gray

while($row = mysql_fetch_array($result))
{
echo "<_tr> bgcolor='$bg1'>

" . $row['id'];
echo "<_ /td><_td>" . $row['Number'];
echo "<_ /td>";
$bg3 = $bg1; // \
$bg1 = $bg2; // Color rotator
$bg2 = $bg3; // /
}
echo "<_ /tr> <_ /table>" ;

used on /4080/4080-lt-002.php 5/29/2014