php-general | 2003022
Date: 02/24/03
- Next message: Justin French: "Re: [PHP] re-populate array keys"
- Previous message: Sunfire: "[PHP] <button> and </button>"
- In reply to: Justin French: "[PHP] re-populate array keys"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
Justin French <justin <email protected>> 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?
So, in other words, after sorting them, you'd like to "change"
the keys starting from zero?
In that case, I think you can use array_values() ...
- E
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Justin French: "Re: [PHP] re-populate array keys"
- Previous message: Sunfire: "[PHP] <button> and </button>"
- In reply to: Justin French: "[PHP] re-populate array keys"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

