I have an array where the Key is the sales person. The value of the key is an array, with 2 values: A percentage value, and a total value.
In a nutshell, I am trying to sort the Highest percentage value on top.
$sales = array(
"Johnny Smith" => array(75.25,45),
"Ash Han" => array(55.67, 99),
"Janice K." => array(90.00, 40)
);
I've tried a few arrangements or array sorting functions, and none are good enough to even display, since they don't have examples where the array value is an array to sort from.
The end result is where I'd like to display which sales person has the highest percentage to lowest percentage. In the case above, "Janice K." has a percentage of 90.00, and she has 40 sales. In a nutshell, she has made 40 sales, and 90% of them have cleared.
Is it possible to sort based on the $value of a $key, if it's an array?