我有以下数组:
数组([20] => 154 [21] => 146 [24] => 230 [26] => 80 [33] => 232 [113] => 100 [13] => 132 [12] => 146 [11] => 122 [235] => 110 [239] => 54 [248] => 162 [340] => 84 [352] => 76 [323] => 146 [247] => 96 [372 ] => 150 [370] => 128)
我需要能够从这个数组中获取前五个值
最终结果需要看起来像这样:
Array(
[ 33] => 232
[ 24] => 230
[ 248] => 162
[ 20] => 154
[ 372] => 150
)
如果这可以通过简单地重新排序数组来完成,那很好。