note 44208 deleted from function.is-integer by tomsommer
| From: | tomsommer@php.net | Date: | Sun, 18 Jul 2004 13:24:34 +0000 |
| Subject: | note 44208 deleted from function.is-integer by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73482@lists.php.net to get a copy of this message | ||
Note Submitter: michael@Htmlland.net
----
This function can help to tell if a number is odd or even:
<?
$num="2020303289";
$thediv= $num / 2;
if(is_integer($thediv)){
echo"The number $num is an even number";
}
else{
echo"The number $num is an odd number";
}
?>
This would output:
The number 2020303289 is an odd number