Re: [PHP] isodd() php5?

2007-10-30 Thread tedd
At 9:32 AM + 10/30/07, Hulf wrote: Hi, Is there a built in function in PHP5 to determine if an integer is even or odd? Ross Try: echo($integer & 1); 1 = odd, 0 = even. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mail

Re: [PHP] isodd() php5?

2007-10-30 Thread Jason
At 09:32 30/10/2007, Hulf wrote: Hi, Is there a built in function in PHP5 to determine if an integer is even or odd? How about : if ($IntegerValue % 2) { // odd } else { // even } HTH J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

[PHP] isodd() php5?

2007-10-30 Thread Hulf
Hi, Is there a built in function in PHP5 to determine if an integer is even or odd? Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php