If Failing - Very strange
| From: | Mitch Vincent | Date: | Tue, 31 Jul 2001 19:57:13 +0000 |
| Subject: | If Failing - Very strange | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-60495@lists.php.net to get a copy of this message | ||
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