I'm trying to understand what is being evaluated in the if statement contained within the for loop i.e what does '1&$i' expand to?
for( $i= 0 ; $i <= 10 ; $i++ )
{
if(1&$i) {
//do something
}
}
I'm trying to understand what is being evaluated in the if statement contained within the for loop i.e what does '1&$i' expand to?
for( $i= 0 ; $i <= 10 ; $i++ )
{
if(1&$i) {
//do something
}
}
The if statement is basically saying "If $i
is odd, then do something"