southbeach
Programmer
I just came across a snippet of code where
if(($iCounter+1)%2==0)
is used within a while loop. Variable $iCounter is incremented within the loop.
What is this looking for? My guess is that it is checking for ODD / EVEN numbers where 0 equals FALSE and 1 equals TRUE.
What say you?
Thanks!
if(($iCounter+1)%2==0)
is used within a while loop. Variable $iCounter is incremented within the loop.
What is this looking for? My guess is that it is checking for ODD / EVEN numbers where 0 equals FALSE and 1 equals TRUE.
What say you?
Thanks!