This is my array (after I did asort):
array(4) {
["3"]=>
float(24)
["4"]=>
float(50)
["2"]=>
float(50)
["1"]=>
float(50)
}
It is sorted by the its value. This is ok, but in case the value is the same, I want to sort only these values by key.
If I use ksort(myarray)
my array is sorted by keys:
array(4) {
["1"]=>
float(50)
["2"]=>
float(50)
["3"]=>
float(24)
["4"]=>
float(50)
}
But then it is not sorted by value anymore.
The result I would like to achieve is:
array(4) {
["3"]=>
float(24)
["1"]=>
float(50)
["2"]=>
float(50)
["4"]=>
float(50)
}