I'm having a very annoying problem this morning....
If I increment a variable by small floats (like 0.00001 lets say) in a loop, the vairable becomes EXPONENT_DNUM format. I would like to keep it in LNUM format. Any ideas?
I've made a simple loop here to show an example:
PHP Code:
<?PHP
$var = 0;
for ($i=0;$i<5;$i++) {
$var += 0.000004;
}
echo $var;
?>
That gives me "2E-05" instead of the 0.00002 I"m looking for.