I want to convert an array to 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 a way to convert an array to a string, but that will not allow me to perform mathematical operations, right?
So, does anyone know how to convert an array to one continuous number?
Thank.
source
share