One Bug Left...

From: Date: Thu, 29 Jun 2000 21:56:44 +0000
Subject: One Bug Left...
Groups: php.general 
Request: Send a blank email to php-general+get-3910@lists.php.net to get a copy of this message
Hi; I've got a bug here I can't spot... if ($age < 2) { $agezh = 0; } elseif ($age < 4) { $agezh = 1; } elseif ($age < 7) { $agez = 2; } else { $agezh = 3; } Now, $age is a real number (like 1.23456789) and it is the actual age of the horse (checked it through *echo* lines of code), but for *some reason* usually (but not always) when $age actually is less than or equal to the number 2, it does not satisfy the condition. What am I missing here? TIA, BenO

« previous php.general (#3910) next »