I have a number 3.43E-6 and i need to convert it into 0.00000343. Is that possible with PHP?
I tried PHP number_format but not worked as expected.
Number:- 3.43E-6
Expected result:- 0.00000343
>Solution :
yes it is possible try this and you can modify this 8 if u want more decimal '%.8f
$number = 3.43E-6;
$decimal = sprintf('%.8f', $number);
echo '$' . $decimal; // output: $0.00000343
also this is another example
$decimal = sprintf('%.10f', $number);
echo '$' . $decimal; // output: $0.0000034300