将多维数组,合并为一维数组-php

$arr1 = [['a', 'b']];
$arr = [];
$arr = array_merge(array_reduce($arr1, 'array_merge', []), $arr);

参考:
https://blog.csdn.net/eddy23513/article/details/80932289
https://blog.csdn.net/m0_37678007/article/details/107691109

posted @ 2021-12-08 17:54  蓝晓焰  阅读(102)  评论(0编辑  收藏  举报