📜  将数组添加到数组 php 代码示例

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

代码示例6
 "red", 2, 4);
$array2 = array("a", "b", "color" => "green", "shape" => "trapezoid", 4);
$result = array_merge($array1, $array2);
/*
Array
(
    [color] => green
    [0] => 2
    [1] => 4
    [2] => a
    [3] => b
    [shape] => trapezoid
    [4] => 4
)
*/
?>