|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
hi everyone,
I'm looking for a function that destroy arrays keys and putt's instead keys from 0 to the array elements number it's quite simple i don't know why i couldn't fined it. I rather not write my own function because the script is already too heavy (it's quite a big array) thanks |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Mon, 05 Nov 2007 14:24:31 +0100, Gandalf <goldnery@gmail.com> wrote:
> hi everyone, > I'm looking for a function that destroy arrays keys and putt's instead > keys from 0 to the array elements number > it's quite simple i don't know why i couldn't fined it. $array = ....; $new = array_values($array); unset($array); > I rather not write my own function because the script is already too > heavy (it's quite a big array) Why is it indexed in another way then your needs to begin with? -- Rik Wasmus |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
or you could use sort() if the order isnt important...
|
|
![]() |
| Outils de la discussion | |
|
|