配列があり、実行すると次のようprint_r($array)
になります。
Array
(
[XS] => 110
[S] => 171
[M] => 172
[L] => 171
[XL] => 171
[2X] => 172
[3X] => 154
[4X] => 139
[5X] => 47
[6X] => 32
[OSFA] => 12
[FITTED S-M] => 12
[FITTED L-XL] => 12
[ADJ] => 52
[YXS] => 15
[YSM] => 20
[YMD] => 20
[YLG] => 20
[YXL] => 17
[TLG] => 1
[TXL] => 1
[T2X] => 1
[T3X] => 3
[S-M FLEX] => 3
[M-L FLEX] => 3
[L-XL FLEX] => 3
[CHILD STRETCH] => 1
[S/M] => 1
)
降順で並べ替えたいのですが、arsort
1 を返します。for ループで並べ替えることができますが、最善の解決策が必要です。なにか提案を?