I want to convert an array in one large number in PHP.
For example, I have an array $array:
$array[0] = 10;
$array[1] = 20;
$array[2] = 30;
$array[3] = 40;
I want this to be:
$one_large_number = 10203040;
I read somewhere the way to convert an array into a string, but that won’t allow me to perform mathematical operations, right?
So anyone know how to convert the array to one continuous number?
Thanks.
A little more about it in here: http://www.w3schools.com/php/func_string_join.asp
http://codepad.org/Dv0zdtaJ – live example. As you can see, you can easily perform further mathematical functions with that number 🙂