Re: If value is odd or not

From: Date: Fri, 02 Jun 2006 14:08:07 +0000
Subject: Re: If value is odd or not
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-237269@lists.php.net to get a copy of this message
At 3:32 PM +0200 6/2/06, Jonas Rosling wrote: >Hi all, >is there any easy why to check if a value is odd or not? Jonas: echo($num & 1); This produces 1 for odd and 0 for even. tedd -- ------------------------------------------------------------------------------------ http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#237269) next »