Jonas Rosling wrote:
Hi all, is there any easy why to check if a value is odd or not?
the modulos operator: read about what it does here: http://php.net/manual/en/language.operators.arithmetic.php here is a simple example of how to check if something is odd or not (odd number that is ;-): $x = 1; $y = 2; $z = 3; var_dump(($x % 2), ($y % 2), ($z % 2));
Thanks // Jonas
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php