Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001072

Re: [PHP] If Failing - Very strange From: Matt Kaufman (phpnet <email protected>)
Date: 07/31/01

I'm not sure, but don't you do something with endif(); ?

Matt Kaufman
----- Original Message -----
From: "Mitch Vincent" <mvincent <email protected>>
To: <php-general <email protected>>
Sent: Tuesday, July 31, 2001 12:57 PM
Subject: [PHP] If Failing - Very strange

> Could someone explain this?
>
> if( $fCredit > $fQuoteTotal )
> $fCredit = $fQuoteTotal;
>
> ^- Fails.
>
> if( $fCredit > $fQuoteTotal ) {
>
> $fCredit = $fQuoteTotal;
>
> }
>
> ^- Passes
>
> if((float)$fCredit > (float)$fQuoteTotal)
> $fCredit = $fQuoteTotal;
>
> ^- Passes.
>
> The curley braces seem to make all the difference here -- bug?
>
> Thanks!!!
>
> -Mitch
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>