php-general | 2001072
Date: 07/31/01
- Next message: Jan Pavlík: "[PHP] PHP snapshot & librecode problem"
- Previous message: Mitch Vincent: "[PHP] If Statement"
- In reply to: Mitch Vincent: "[PHP] If Failing - Very strange"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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>
- Next message: Jan Pavlík: "[PHP] PHP snapshot & librecode problem"
- Previous message: Mitch Vincent: "[PHP] If Statement"
- In reply to: Mitch Vincent: "[PHP] If Failing - Very strange"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

