Thread: odd or even
View Single Post
  #2 (permalink)  
Old 09-03-2008, 06:44 AM
curtiss's Avatar
curtiss curtiss is offline
Moderator
 
Join Date: May 2003
Posts: 1,468
Exactly the way you've written it.

The "if" portion of your statement is going to be even, the "else" portion of that statement is going to be odd.

Now, the way your statement is written, you are determining whether there are an odd or even number of items in the spanid[$i] array. I'm thinking you probably actually want to evaluate $i%2 to find out whether $i is even or odd, but I'm not sure.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote