How to reset array keys using PHP
Here is what I want to accomplish:
Original array:
$array[9] = 'Apple';
$array[12] = 'Orange';
$array[5] = 'Peach';
I want to make the above array looks like below:
$array[0] = 'Apple';
$array[1] = 'Orange';
$array[2] = 'Peach';
I just want to re-arrange (reset) the keys in order without changing the order of the array.

milly 11:22 pm on December 29, 2009
You can accomplish the reset by using the array_values function.
The array get re-arranged after array_values function.