note 33215 added to function.ceil

From: Date: Thu, 19 Jun 2003 13:40:44 +0000
Subject: note 33215 added to function.ceil
Groups: php.notes 
Request: Send a blank email to php-notes+get-50646@lists.php.net to get a copy of this message
Here is a function that tell u if a positive or negative number is even or odd. Function code: <?php function ar_jamnt($nr) { $half = $nr / 2; $new = ceil($half) * 2; if ($new > $nr) { Return Odd; } else { Return Even; } } ?> ---- Manual Page -- http://www.php.net/manual/en/function.ceil.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33215 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33215&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33215&report=yes

« previous php.notes (#50646) next »