Convert exponential to a whole number in PHP

DLS picture DLS · Feb 11, 2011 · Viewed 18.3k times · Source

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

Answer

Mchl picture Mchl · Feb 11, 2011
number_format(1.2378147769392E+14,0,'','')

However, for working with large numbers, if you want to keep precision, you should look into BCMath extension