> I suppose when you have so few problems you get to nitpick..
>
> Guess my question is; why doesn't this work?
>
> if(sprintf("%01.2f",$Result[CurrentPrice]+$Result[Increment]) <=
sprintf("%01.2f",$BidAmt)) {
>
> when this works;
> if(0.30 <= 1.00) {
>
> I'll just settle with a workaround for now.
>
> Thanks,
> Chris

The former is being treated as a string, the latter is a double/float
You probably don't need to format them when making the comparison. Just try:

if ( ($Result[CurrentPrice]+$Result[Increment]) <= $BidAmt) {

jason




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to