Re: re-populate array keys
| From: | Justin French | Date: | Mon, 24 Feb 2003 05:07:03 +0000 |
| Subject: | Re: re-populate array keys | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-136820@lists.php.net to get a copy of this message | ||
Oooops!
Didn't see it, despite looking over and over :)
Thx,
Justin
on 24/02/03 3:42 PM, John W. Holmes (holmes072000@charter.net) wrote:
>> Hi, after asort()ing an array, the numeric keys are obviously out of
>> order.
>> what i'd like to do is reset the keys, starting at zero.
>>
>> is there a function for this, or do I just walk through the array with
> a
>> foreach() and do it manually?
>
> Why don't you just use sort()?
>
> ---John W. Holmes...
>
> PHP Architect - A monthly magazine for PHP Professionals. Get your copy
> today. http://www.phparch.com/
>
>