php-general | 2001072
Date: 07/31/01
- Next message: Mitch Vincent: "[PHP] If Statement"
- Previous message: scott [gts]: "[PHP] issues with __sleep() and __wakeup()"
- Next in thread: Matt Kaufman: "Re: [PHP] If Failing - Very strange"
- Reply: Matt Kaufman: "Re: [PHP] If Failing - Very strange"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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>
- Next message: Mitch Vincent: "[PHP] If Statement"
- Previous message: scott [gts]: "[PHP] issues with __sleep() and __wakeup()"
- Next in thread: Matt Kaufman: "Re: [PHP] If Failing - Very strange"
- Reply: Matt Kaufman: "Re: [PHP] If Failing - Very strange"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

