Is there any easy & efficient way to re-number the array index? for example, 
if I have an array with only something like:
$arr[1] = "t"
$arr[4] = "e"
$arr[7] = "s"

I would like the index to be re-numbered so that I can have 
$arr[0] = "t"
$arr[1] = "e"
$arr[2] = "s"

This is useful sometime because a function like array_unique preserves the 
indexes of array, and sometime make them un-order. Well, sometime I don't 
care about the preservation of index, and I just want an ordered index 
I know I can walk through the array and re-assign them to different array or 
do something like that with a loop. But I'm just wondering if there is a more 
efficient / quicker way.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to