这是一个代表年份和月份的 php 数组:
array:3 [
2017 => array:2 [
0 => "2"
1 => "3"
]
2018 => array:2 [
0 => "1"
1 => "5"
]
2019 => array:3 [
0 => "10"
1 => "12"
2 => "6"
]
]
我想根据第一级的键(降序)和第二级的值(降序)对其进行排序。通过这个最近一年最近一个月的记录将出现。所以输出必须是:
array:3 [
2019 => array:3 [
0 => "12"
1 => "10"
2 => "6"
]
2018 => array:2 [
0 => "5"
1 => "1"
]
2017 => array:2 [
0 => "3"
1 => "2"
]
]
明月笑刀无情