note 10014 deleted from function.is-float by jimw
| From: | jimw@php.net | Date: | Thu, 20 Dec 2001 23:38:43 +0000 |
| Subject: | note 10014 deleted from function.is-float by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23588@lists.php.net to get a copy of this message | ||
This is useful if you are creating a report page (like detailed ledgers for finance) for alternating
colors in tables:
$myVar = 0;
for ($x = 0, $x < 32; ++$x){
$checkme = $myVar / 2;
if(is_float($checkme)){
$my_color = "black";
} else {
$my_color = "white";
}
$myVar = $myVar + 1;
}
If the division by 2 of your $myVar has a decimal value associated with it, it will flag it as a
float integer rather than a rounded number.