1 回答
TA贡献1847条经验 获得超7个赞
尝试使用下一个foreach循环:
$merged_result = array();
foreach($sorted as $subar1){
foreach($subar1 as $val){
foreach($sorted_Rcv as $subar2){
foreach($subar2 as $val2){
if ($val['Year'] == $val2['Year'] && $val['Month'] == $val2['Month'] && $val['Account'] == $val2['Account']){
$merged_result[] = [
'Year' => $val2['Year'],
'Month' => $val2['Month'],
'Account' => $val2['Account'],
'Analyzed' => $val['Analyzed'],
'Received' => $val2['Received'],
];
}
}
}
}
}
- 1 回答
- 0 关注
- 71 浏览
添加回答
举报