Php – Sort delimited array values by first half ascending then by second half descending
I am trying to sort my array values with sizes but the result is not as I expected. This is my code: function cmp($a, $b) { $sizes = array( "XS" => 0, "S" => 1, "M" => 2, "L" =>…