可能是重复问题:
在指定位置插入数组
如何将1个或多个值推到数组的中间(或特定位置/索引)? 例如:
$a = array('a', 'b', 'e', 'f');
array_pushTo($a, 1, 'c', 'd'); // that function i'm looking for. first parameter is the array, second is the index, and third and other are the values.
// $a now is: array('a', 'b', 'c', 'd', 'e', 'f');
array_splice()
http://us3.php.net/manual/zh/function.array-splice.php - Michael Berkowski