[solved]Converting a large integer into a string of numbers.
Posted: Thu Feb 21, 2008 11:35 am
I need to convert a large integer like 5055279512315 into a string. Everything I try ends up with PHP converting it into scientific notation though...
Is there a way just turn it straight from the int into a string of the same numbers?
Code: Select all
$number = 5055279512315;
$code = strval($number); //5.05527951232E+012
$code = settype($number, "string"); //5.05527951232E+012
$code = (string) $number; //5.05527951232E+012
$code = "$number"; //5.05527951232E+012
$code = substr($number, 0, 12); //5.05527951236