Rate this script:  I Love it  /   I Hate it

The Modulo Operator for Alternating Rows


Code


for($i=0;$i<10;$i++)
{
  if($i % 2)
  {
   // I'm in an even row
  }else{
   // I'm in an odd row
  }
}
 

 

 
The Modulo Operator for Alternating Rows scripts | The Modulo Operator for Alternating Rows snippet | The Modulo Operator for Alternating Rows example | The Modulo Operator for Alternating Rows tutorial | The Modulo Operator for Alternating Rows code