Можно так:
function insertToArray($array=array(), $new=array(), $after='') {
$res = array();
$res1 = array();
$res2 = array();
$c = 0;
$n = 0;
foreach ($array as $k => $v) {
if ($k == $after) {
$n = $c;
}
$c++;
}
$c = 0;
foreach ($array as $i => $a) {
if ($c > $n) {
$res1[$i] = $a;
} else {
$res2[$i] = $a;
}
$c++;
}
$res = $res2 + $new + $res1;
return $res;
}
$arr = array(
'key1' => 0,
'key2' => 0,
'keyN' => 0,
);
$new = array('new' => 0);
$arr = insertToArray($arr, $new, 'key2');
echo '<pre>'; print_r($arr); echo '</pre>';
Результат:
Array
(
[key1] => 0
[key2] => 0
[new] => 0
[keyN] => 0
)