I have a numeric index array.
It can begin with any number, and then go on a hundred times.
I would rather have it ordered.
Example:
$myarray = array();
$myarray[500] = 2;
$myarray[501] = 3;
Should be:
$myarray[0] = 2;
$myarray[1] = 3;
I know I could do this with a foreach
:
$i = 0;
foreach($myarray as $key => $value){
$myarray[$i] = $value;
$i++
}
Is there any function for this in PHP?