我想按“日期”字段对以下选项卡进行排序并计算“临时”字段的总和:
0 => array (size=3) 'id_cra' => string '4586' (length=4) 'temps' => string '03:00:00' (length=8) 'date' => string '2013-06-03' (length=10)
1 => array (size=3) 'id_cra' => string '4587' (length=4) 'temps' => string '03:00:00' (length=8) 'date' => string '2013-06-06' (length=10)
2 => array (size=3) 'id_cra' => string '4588' (length=4) 'temps' => string '03:00:00' (length=8) 'date' => string '2013-06-05' (length=10)
3 => array (size=3) 'id_cra' => string '4589' (length=4) 'temps' => string '03:00:00' (length=8) 'date' => string '2013-06-06' (length=10)
4 => array (size=3) 'id_cra' => string '4590' (length=4) 'temps' => string '03:00:00' (length=8) 'date' => string '2013-06-07' (length=10)
5 => array (size=3) 'id_cra' => string '4591' (length=4) 'temps' => string '02:00:00' (length=8) 'date' => string '2013-06-03' (length=10)
6 => array (size=3) 'id_cra' => string '4592' (length=4) 'temps' => string '03:30:00' (length=8) 'date' => string '2013-06-03' (length=10)
预期结果:
日期=>“临时”字段的总和
2013-06-03 =>08:30:00
2013-06-06 =>06:00:00
ETC
PS:很抱歉问了一些对你来说可能很简单的问题,我已经在互联网上检查过(例如这里:Sort array of objects by object fields)但我不明白答案