Given this array:
$inventory = array( array(\"type\"=>\"fruit\", \"price\"=>3.50), array(\"type\"=>\"milk\", \"price\"=>2.90), array(\"
While others have correctly suggested the use of array_multisort(), for some reason no answer seems to acknowledge the existence of array_column(), which can greatly simplify the solution. So my suggestion would be:
array_multisort(array_column($inventory, 'price'), SORT_DESC, $inventory);