if i have a number:
$num = 0.00638835;
which is an average of 100 entries. I want to find the average and print it.
$avg = $num/100;
my result prints as:
echo $avg;
6.38835E-5
how can i print it as:
.000004928 //or whatever the number is
if i have a number:
$num = 0.00638835;
which is an average of 100 entries. I want to find the average and print it.
$avg = $num/100;
my result prints as:
echo $avg;
6.38835E-5
how can i print it as:
.000004928 //or whatever the number is
https://www.w3schools.com/php/func_string_number_format.asp
$num = 0.00638835;
$avg = $num/100;
echo number_format ($avg, 8);
0.00006388
echo number_format($a, 10);
with number format you can select any number of decimals