Discard keys even numerics
Posted: Sat Dec 02, 2006 2:59 pm
I'm having a blonde day today. I always thought array_values did this but obviously not. Is there a single function call to discard all the keys and start index again from zero. What I want is this:
Code: Select all
$array = array(1 => 'a', 50 => 'b');
$this->assertIdentical(someFunc($array), array(0 => 'a', 1 => 'b'));