我有一个这样的数组数组:
array('0'=>
array(
'fromDate' =>2007,
'toDate' => 2008,
'value' => 7)
'1'=>
array(
'fromDate' =>2010,
'toDate' => ,
'value' => 3)
'2'=>
array(
'fromDate' => 2007,
'toDate' => ,
'value' => 4))
我想计算“价值”,将它们按“fromDate”分组,如下所示:
array('0' =>
array(
'fromDate' => 2007,
'sum' => 2)
'1' =>
array(
'fromDate' => 2010,
'sum' => 1))
任何帮助深表感谢!