Re: One Bug Left...
| From: | php at theOrb dot net | Date: | Thu, 29 Jun 2000 22:17:08 +0000 |
| Subject: | Re: One Bug Left... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3914@lists.php.net to get a copy of this message | ||
Hi Ben,
If you just cut and pasted then you have a typo following the second
elseif. $agez should be $agezh. Hope that helps.
mike
Ben Ocean wrote:
>
> 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
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net