Re: If value is odd or not
| From: | IG | Date: | Fri, 02 Jun 2006 13:40:57 +0000 |
| Subject: | Re: If value is odd or not | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237260@lists.php.net to get a copy of this message | ||
Jonas Rosling wrote:
Hi all, is there any easy why to check if a value is odd or not? Thanks // Jonas $value = 3;if (strpos(($value/2),".") === FALSE) {echo "even";} else {echo "odd";}