Possible Duplicate:
PHP - Get rid of notation
Given the number 1.905e+06
, how can I convert it to a non-scientific notation using PHP?
Is there a function I could use? For example, the literal 1.905e+06
would become 1905000
.
Possible Duplicate:
PHP - Get rid of notation
Given the number 1.905e+06
, how can I convert it to a non-scientific notation using PHP?
Is there a function I could use? For example, the literal 1.905e+06
would become 1905000
.
$n = 1.905e+06;
echo sprintf('%d', $n)."
";
echo (int)$n."
";
echo (int)((float)$n)."
";
echo sprintf('%f', $n)."
";
echo (float)$n."
";
Any one of those methods? demo here