Array function

Array function

am 05.11.2007 14:24:31 von goldnery

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

Re: Array function

am 05.11.2007 15:34:22 von luiheidsgoeroe

On Mon, 05 Nov 2007 14:24:31 +0100, Gandalf 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 =3D ....;
$new =3D 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

Re: Array function

am 05.11.2007 19:19:35 von Macca

or you could use sort() if the order isnt important...