Suppose I have an array like so:
    $array => Array
    (
        [5] => 0.33
        [3] => 1             
        [2] => 0.33
    )
When I do asort($array) I get:
    $array => Array
    (
        [5] => 0.33
        [2] => 0.33
        [3] => 1             
    )
How can I sort it so that first the values get sorted and if they have same value then the keys get sorted, so that my final output would be:
   $array => Array
    (
        [2] => 0.33
        [5] => 0.33
        [3] => 1             
    )