我有以下两个数组:
[BA] => Array
(
[0] => Array
(
[num] => 55
[val] => 1
)
[1] => Array
(
[num] => 41
[val] => 5
)
[2] => Array
(
[num] => 65
[val] => 27
)
[3] => Array
(
[num] => 60
[val] => 28
)
[4] => Array
(
[num] => 70
[val] => 90
)
[5] => Array
(
[num] => 78
[val] => 113
)
[6] => Array
(
[num] => 85
[val] => 119
)
)
[GE] => Array
(
[0] => Array
(
[num] => 76
[val] => 1
)
[1] => Array
(
[num] => 26
[val] => 6
)
[2] => Array
(
[num] => 69
[val] => 11
)
[3] => Array
(
[num] => 64
[val] => 48
)
[4] => Array
(
[num] => 9
[val] => 85
)
[5] => Array
(
[num] => 36
[val] => 112
)
[6] => Array
(
[num] => 90
[val] => 127
)
)
我需要按“val”对上述两个数组进行降序排序,并将它们合并到一个数组中,如下所示:
[new] => Array
(
[0] => Array
(
[ruota] => 'GE'
[num] => 90
[val] => 127
)
[1] => Array
(
[ruota] => 'BA'
[num] => 85
[val] => 119
)
[2] => Array
(
[ruota] => 'BA'
[num] => 78
[val] => 113
)
[3] => Array
(
[ruota] => 'GE'
[num] => 36
[val] => 112
)
[4] => Array
(
[ruota] => 'BA'
[num] => 70
[val] => 90
)
[5] => Array
(
[ruota] => 'GE'
[num] => 9
[val] => 85
)
[6] => Array
(
[ruota] => 'GE'
[num] => 64
[val] => 48
)
)
请问,有人可以帮我吗?非常感谢您!:)