我有 3 个数组表示按日期分组的数据计数$dummyArray1 = array('year' => array('month' => 'count'));
$dummyArray1 = array(
'2012' => array(
'1' => 13,
'2' => 22,
'3' => 18,
'5' => 19
),
'2011' => array(
'1' => '4',
'3' => 13
)
);
$dummyArray2 = array(
'2012' => array(
'1' => 44,
'4' => 34,
'5' => 38,
'6' => 29
),
'2011' => array(
'1' => 9,
'2' => 11,
'3' => 1
)
);
$dummyArray3 = array(
'2012' => array(
'2' => 5,
'4' => 3,
'6' => 1,
'8' => 11
),
'2011' => array(
'3' => 9,
'4' => 14,
'9' => 9
)
);
我需要将它们分组到 1 个数组中,以便每个月我都会获得count
每个数组的值。如果特定月份不存在计数数据,则应将其作为值0
插入。count