I know Im beeing picky here, but what is $i is 5?
Sorry -
I forgot to post the email I was replying to.
We were just talking about an easy way to do those table-rows-switching-color things.
Where you really do just want to set either "$color=#FFFFFF" or "$color=#CCCCCC"
A simple on/off. either/or.
It wasn't meant to be a big generic solution for any variable changing.
At 07:15 AM 12/1/00 , you wrote:
while(....)
{
$i =+ 1;
$i % 2 ? print "color 1" : "color 2";
}
Another method is:
$i = 1-$i
So it just keeps flagging back and forth between 1 and 0.