Possible Duplicate:
Convert exponential number to decimal in php
Is there a way to convert an exponential number to a whole number in PHP using built in functions? A format function?
1.2378147769392E+14 to 123781477693917
PHP FloatsA float is a number with a decimal point or a number in exponential form. 2.0, 256.4, 10.358, 7.64E+5, 5.56E-5 are all floats. The float data type can commonly store a value up to 1.7976931348623E+308 (platform dependent), and have a maximum precision of 14 digits.
The string number can also be converted into an integer or float by adding 0 with the string. In PHP, performing mathematical operations, the string is converted to an integer or float implicitly. echo $num + 0.1; ?>
number_format(1.2378147769392E+14,0,'','')
However, for working with large numbers, if you want to keep precision, you should look into BCMath extension
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With