PHP Technical Blog
Tuesday, November 8, 2011
php large number or integer problem converting its adding some plus symbol
php large number or integer problem converting its adding some plus symbol
example:
$var = 100000179860794
echo $var;
output => 1.0000017986079E+14
Using number_format function
$modified = number_format($var, 0, "", "");
output => 100000179860794
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment