从一个数组合并多个数组

从一个数组合并多个数组

问题描述:

如何从单个数组变量合并多个数组?假设我在 one 数组变量

How to merge multiple arrays from a single array variable ? lets say i have this in one array variable

那些在一个变量中..
$array = array(array(1), array(2));

Array
(
    [0] => 1
)
Array
(
    [0] => 2
)

如何结束这个

Array
(
   [0] => 1
   [1] => 2
)

这是 PHP 等效的 javascript Function#apply(从数组生成参数列表):

This is the PHP equivalent of javascript Function#apply (generate an argument list from an array):

$result = call_user_func_array("array_merge", $input);

演示:http://3v4l.org/nKfjp