php合并两个二维数组

$a = array(0 => Array(id => 66,class_name => math),1 => Array(id => 67,class_name => linux ));
$b = array(0 => Array(class_count=> 8),1 => Array(class_count => 2));
$arr = array();
foreach($a as $k=>$r){
   $arr[] = array_merge($r,$b[$k]);
     }
posted @ 2020-01-02 16:02  S流星  阅读(3444)  评论(0编辑  收藏  举报