我正在尝试按键组合数组。所以所有以相同子键开头的子数组都会合并为一个子数组。另外,我想保留匹配值的最小值。
目前这就是我所拥有的:
$statement = Array
(
[662_0] => Array
(
[0] => 06-01-2012
[1] => 436
[2] => MEDIA
[3] => 2006
[4] => Template Testing
[5] => KS
[6] => 662
[7] => 0
[8] => 0
[9] => 0
[10] => 0
[11] => 0
[12] => 1290
[13] => 1290.00
[14] => 0.00
[15] => 0
[16] => 1290.00
)
[662_1] => Array
(
[0] => 06-01-2012
[1] => 436
[2] => MEDIA
[3] => 2006
[4] => Template Testing
[5] => KS
[6] => 662
[7] => 295.00
[8] => 0
[9] => 0
[10] => 0
[11] => 0
[12] => 995
[13] => 1290.00
[14] => 0.00
[15] => 0
[16] => 1290.00
)
[662_2] => Array
(
[0] => 06-01-2012
[1] => 436
[2] => MEDIA
[3] => 2006
[4] => Template Testing
[5] => KS
[6] => 662
[7] => 0
[8] => 0
[9] => 0
[10] => 0
[11] => 0
[12] => 1290
[13] => 1290.00
[14] => 0.00
[15] => 0
[16] => 1290.00
)
[663_0] => Array
(
blah blah blah...
)
);
这就是我想要的:
$statement = Array
(
[662] => Array
(
[0] => 06-01-2012
[1] => 436
[2] => MEDIA
[3] => 2006
[4] => Template Testing
[5] => KS
[6] => 662
[7] => 295.00
[8] => 0
[9] => 0
[10] => 0
[11] => 0
[12] => 995
[13] => 1290.00
[14] => 0.00
[15] => 0
[16] => 1290.00
)
[663] => Array
(
blah blah blah...
)
);
如果需要,很高兴提供更多信息!谢谢!!!