Re: If value is odd or not

From: Date: Mon, 05 Jun 2006 17:51:04 +0000
Subject: Re: If value is odd or not
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-237422@lists.php.net to get a copy of this message
On Fri, June 2, 2006 8:32 am, Jonas Rosling wrote: > is there any easy why to check if a value is odd or not? $parity = $variable % 2 ? 'even' : 'odd'; echo "$variable is $parity<br />\n"; -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#237422) next »