[Solved] How to sort an array with the vales first and then the keys? [duplicate]


Give it a try

$array = array(array_values($array),array_keys($array));
array_multisort($array[0], SORT_DESC, $array[1], SORT_ASC);
$sorted_array = array_combine($array[1],$array[0]);

1

solved How to sort an array with the vales first and then the keys? [duplicate]