RE: [PHP] Simple array question, part 2
| From: | Jay Blanchard | Date: | Wed, 06 Apr 2005 16:30:12 +0000 |
| Subject: | RE: [PHP] Simple array question, part 2 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-212439@lists.php.net to get a copy of this message | ||
[snip]
I have a $data array like this:
[0] => 158
[1] => 169926
[2] => 169931
[3] => 169932
[4] => 169933
then when i delete the first one ([0] => 158) it becomes like this:
[1] => 169926
[2] => 169931
[3] => 169932
[4] => 169933
how do I get it to sort again from 0,1,2,3 etc?
I tried sort(), ksort(),reset() etc....but it still shows as starting
from 1
instead of resorting the keys starting from 0
what function should i lookup/use?
[/snip]
http://www.php.net/array_pop