Jump to content

php inequalities problem


Renlok

Recommended Posts

What does the following show (i.e. you are asking someone to attempt to tell you why a comparison is not working without any information about the actual values being compared) -

var_dump($bid);
echo '<br />';
var_dump($next_bid);

It shows

string(4) "0.29"

float(0.29)

 

EDIT:

but even if i change it to

var_dump(floatval($bid));
echo '<br />';
var_dump($next_bid);
if (floatval($bid) < $next_bid)

it shows

float(0.29)

float(0.29)

but the if statement still returns as true

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.