I have an array with something like this:
Array ( [0] => XL [1] => M [2] => L [3] => XL [4] => S [5] => XXL)
But I want to sort my array as:
S - M - L - XL - XXL
I know that I can do this with usort (), but I get some other values ββlike numbers:
Array ( [0] => 14 [1] => 37 [2] => 38 [3] => 39 [4] => 40 [5] => 44 [6] => 36 [7] => 28 )
I mean, this is a dynamic array ...
I use asort () for this; to sort these values.
Is there any function / way to do this?
source share