📜  php 在数组中插入 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:21.507000             🧑  作者: Mango

代码示例1
$original = array( 'a', 'b', 'c', 'd', 'e' );
$inserted = array( 'x' ); // not necessarily an array, see manual quote

array_splice( $original, 3, 0, $inserted ); // splice in at position 3
// $original is now a b c x d e