note 36565 deleted from function.explode by tomsommer
| From: | tomsommer@php.net | Date: | Mon, 12 Jan 2004 23:01:43 +0000 |
| Subject: | note 36565 deleted from function.explode by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-63376@lists.php.net to get a copy of this message | ||
Note Submitter: joelith@cyberone.com.au
----
Here is a quick way to find out whether a number is even or odd:
$test = ( $number / 2);
$temp = explode('.', $number);
if ($temp[1] == 0){
// even
}
else{
//odd
}
Where $number is the number to test.