4
如何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/en/function.array- splice.php – 2012-02-15 15:26:28
這會幫助你:) http://stackoverflow.com/questions/3797239/php-array-insert-new-item-in-any-position – ExtremeCoder 2012-02-15 15:29:01
還有就是低於答案可以做被接受。 – 2014-09-04 13:50:16