我有一个数组:
Array
(
[0] => Array
(
[id] => 0
[type] => type1
[aa] => 1.00
[bb] => 0.00
[cc] => 1.00
[group] => new
),
[1] => Array
(
[id] => 1
[type] => type2
[aa] => 1.00
[bb] => 0.00
[cc] => 1.00
[group] => new
),
[2] => Array
(
[id] => 4521081
[type] => type3
[aa] => 1.00
[bb] => 0.00
[cc] => 1.00
[group] => old
)
);
如何对上述数组基键进行分组检查。结果看起来像这样:
Array(
'new'=>array(
'type1'=>array(
[id] => 0
[aa] => 1.00
[bb] => 0.00
[cc] => 1.00
),
'type2'=>array(
[aa] => 1.00
[bb] => 0.00
[cc] => 1.00
)
),
'old'=>array(
'type3'=>array(
[aa] => 1.00
[bb] => 0.00
[cc] => 1.00
)
)
);