Array function

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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)


Re: Array function

Quoted text here. Click to load it

$array = ....;
$new = array_values($array);

Quoted text here. Click to load it

Why is it indexed in another way then your needs to begin with?
-- =

Rik Wasmus

Re: Array function

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

Site Timeline