push to specific position of array
本问题已经有最佳答案,请猛点这里访问。
Possible Duplicate:
Insert into array at a specified place
号
如何将一个或多个值推送到数组的中间(或特定位置/索引)?例如:
1 2 3 | $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'); |
1 |