Isn't there a function for this?

This feels clumsy…


$array = array_reverse(array_reverse($array));

I need to restore the keys of the array to a sequential order after unset was called on one of the members…

Before 0,1,3,4
After 0,1,2,3

It’s late, I’m tired, but I can’t think of a fast way to do that rather than reversing the array twice.

Thanks.

http://us.php.net/manual/en/function.array-values.php