The accuracy of PHP float calculate
<pre><code>$fooValue = 100.68;
$cowValue = 100.67;

$diffValue = $fooValue - $cowValue;
if($diffValue &lt;= 0.01) {
    echo("success");
} else {
    echo("error");
}
</code></pre>

<p>This will show "error".</p>

<p>I know what to do in Java. But I'm not good at PHP, especially with this calculate things.</p>

<p>Please help me out. I mean how to succeed this?</p>
