You'd have to write your own function to do so - there isn't a function to do that as far as I know in the current PHP build.
Do something like this:
$x = array("key1" => "val1", "key2" => "val2");
$i = 0;
foreach($x as $val) {
$x["$i"] = $val;
$i++;
}
//Disclaimer: the above code has not been compiled or debugged. Errors may be present.