[Solved] How to sort an array with the vales first and then the keys? [duplicate]
[ad_1] 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 [ad_2] solved How to sort an array with the vales first and then the keys? [duplicate]