Re: isodd() php5?

From: Date: Tue, 30 Oct 2007 09:39:28 +0000
Subject: Re: isodd() php5?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-263803@lists.php.net to get a copy of this message
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

« previous php.general (#263803) next »