Is there any way to have an array with items like:
$array[1];
$array[3];
$array[4];
Be turned into an array like this:
$array[1];
$array[2];
$array[3];
So that the array has only sequential numeric keys? Thanks!
-iMaster
arraysMySQLPHP
Is there any way to have an array with items like:
$array[1];
$array[3];
$array[4];
Be turned into an array like this:
$array[1];
$array[2];
$array[3];
So that the array has only sequential numeric keys? Thanks!
-iMaster
Best Answer
array_values()
returns all the values from the input array and indexes numerically the array.