$arr = array(1 => 'Foo', 5 => 'Bar', 6 => 'Foobar');
/*... do some function so $arr now equals:
    array(0 => 'Foo', 1 => 'Bar', 2 => 'Foobar');

Accepted Answer

Use array_values($arr). That will return a regular array of all the values (indexed numerically).

PHP docs for array_values

Written by Brian Ramsay
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki