[PHP] How can I see if variable is a odd or an even number?

2001-07-16 Thread SED
Do you know if there is a function to find out if a variable contains a odd or an even number? I checked the manual but didn't see it. Thanks! Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354)

RE: [PHP] How can I see if variable is a odd or an even number?

2001-07-16 Thread scott [gts]
even numbers are even becuase they're divisible by 2 w/o a remainder... use this property to your advantage: if ( $num % 2 ) { print $num is odd; } else { print $num is even; } -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 12:07