$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]); }
本文共 291 字,大约阅读时间需要 1 分钟。
$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]); }
转载于:https://www.cnblogs.com/lamp01/p/7112407.html