Re: If value is odd or not

From: Date: Fri, 02 Jun 2006 14:24:55 +0000
Subject: Re: If value is odd or not
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-237273@lists.php.net to get a copy of this message
$odd = array("1","3","5","7","9"); if(inarray(substr($var,strlen($var)-1,1),$od) { //haha } else { //even } p.s. sorry for the direct mail Jonas Rosling wrote:
Hi all, is there any easy why to check if a value is odd or not? Thanks // Jonas


« previous php.general (#237273) next »