RE: [PHP] If value is odd or not

From: Date: Fri, 02 Jun 2006 14:05:13 +0000
Subject: RE: [PHP] If value is odd or not
Groups: php.general 
Request: Send a blank email to php-general+get-237268@lists.php.net to get a copy of this message
[snip] if ( is_int ( $value / 2 ) ) { // Even } [/snip] :) More? $oddArray = array(1,3,5,7,9); if(in_array(substr($integer, -1, 1))){ echo $integer . " is odd\n"; }

« previous php.general (#237268) next »