[PHP] re-populate array keys

2003-02-23 Thread Justin French
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? Justin -- PHP General Mailing List (http://www.php.net/)

RE: [PHP] re-populate array keys

2003-02-23 Thread John W. Holmes
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...

Re: [PHP] re-populate array keys

2003-02-23 Thread - Edwin
Hello, Justin French [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,

Re: [PHP] re-populate array keys

2003-02-23 Thread Justin French
Oooops! Didn't see it, despite looking over and over :) Thx, Justin on 24/02/03 3:42 PM, John W. Holmes ([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