PHP:如何合并多维数组中的子数组
时间:2020-06-17 22:12:49
收藏:0
阅读:77
如何把多维数组中的每个子数组合并成一个新数组 $result
,有两个方法:
$merged = call_user_func_array(‘array_merge‘, $result);
如果是 PHP 版本在 5.6 以上,可以使用 ...
操作符:
$merged = array_merge(...$result);
原文:https://www.cnblogs.com/gaogaoxingxing/p/13154607.html
评论(0)