RE: [PHP] If value is odd or not
| From: | Ford, Mike | Date: | Fri, 02 Jun 2006 13:47:47 +0000 |
| Subject: | RE: [PHP] If value is odd or not | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-237264@lists.php.net to get a copy of this message | ||
On 02 June 2006 14:32, Jonas Rosling wrote:
> Hi all,
> is there any easy why to check if a value is odd or not?
if ($value%2):
// $value is odd
endif;
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm