Merge multiple arrays from one array

前端 未结 7 1898
臣服心动
臣服心动 2020-12-11 06:03

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

Those are in one variable ..
$array

7条回答
  •  悲&欢浪女
    2020-12-11 06:39

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

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

    demo: http://3v4l.org/nKfjp

提交回复
热议问题