RE: [PHP] re-populate array keys
| From: | John W. Holmes | Date: | Mon, 24 Feb 2003 04:42:21 +0000 |
| Subject: | RE: [PHP] re-populate array keys | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-136816@lists.php.net to get a copy of this message | ||
> 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/