What is the simplest solution to increase by 1 all keys in an array?
BEFORE:
$arr[0] = \'a\'; $arr[1] = \'b\'; $arr[2] = \'c\';
I'm not sure why you'd want to do this, but you should just be able to loop through:
$new_array = array(); foreach($arr as $key => $value){ $new_array[$key+1] = $value; } $arr = $new_array;