At 9:32 AM +0000 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 Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to