Re: If value is odd or not

From: Date: Fri, 02 Jun 2006 13:35:54 +0000
Subject: Re: If value is odd or not
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-237257@lists.php.net to get a copy of this message
On 02/06/06, Jonas Rosling <webmaster@gamearena.se> wrote:
Hi all, is there any easy why to check if a value is odd or not? Thanks // Jonas Yep, use the modulo operator like so:
if ($value % 2 ==0) $odd = false; -- http://www.web-buddha.co.uk dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css) look out for project karma, our new venture, coming soon!

« previous php.general (#237257) next »