I have some float values being looped through an array that are outputting in scientific notation.
I need to convert the scientific notation to a regular flat float long notation value.
I tried number_format(), but it still outputs in scientific notation until the very last cycle of my loop?
<?php
$parray = array(array('BTC-EXP','1',0.000097,1),array('BTC-VOX',7,number_format(0.000075,8),7));
for ($x = 0; $x <= 1; $x++) {
var_dump($parray);
foreach($parray as $pairp){
echo "
Debug info! Limit
";
echo $pairp[2];
echo "
";
print_r(number_format($pairp[2],8));
}
}
?>
output:
Debug info! midpoint
array(2) {
[0]=>
array(4) {
[0]=>
string(7) "BTC-EXP"
[1]=>
string(1) "1"
[2]=>
float(9.7E-5)
[3]=>
int(1)
}
[1]=>
array(4) {
[0]=>
string(7) "BTC-VOX"
[1]=>
int(7)
[2]=>
string(10) "0.00007500"
[3]=>
int(7)
}
}
Debug info! Limit
9.7E-5
0.00009700
Debug info! Limit
0.00007500
0.00007500
Debug info! midpoint
array(2) {
[0]=>
array(4) {
[0]=>
string(7) "BTC-EXP"
[1]=>
string(1) "1"
[2]=>
float(9.7E-5)
[3]=>
int(1)
}
[1]=>
array(4) {
[0]=>
string(7) "BTC-VOX"
[1]=>
int(7)
[2]=>
string(10) "0.00007500"
[3]=>
int(7)
}
}
Debug info! Limit
9.7E-5
0.00009700
Debug info! Limit
0.00007500
0.00007500
How do I convert my float values to long notation through an entire cycle (deny short notation)?