I want to sort array in descending order using php.
like 'XXS','XS','S','M','L','XL','2X','3X','4X','5X','6','7','8','9','10','11'
$attributesData['attributes'][$key]['options'][$search] this will return following array value and its store to $data['attributes'][$key] this array before its store I want to sort by label in $data['attributes'][$key] array.
Array
(
[id] => 68
[label] => 2X
)
Array
(
[id] => 69
[label] => 3X
)
Array
(
[id] => 72
[label] => L
)
Array
(
[id] => 73
[label] => M
)
I tried many way but not getting proper solution.
... '5X','4X','3X','2X', ...? if we talk about descending order