$inventory = array(
array("type"=>"Fruit", "price"=>3.50),
array("type"=>"milk", "price"=>2.90),
array("type"=>"Pork", "price"=>5.43),
);
$prices = array_column($inventory, 'price');
$inventory_prices = array_multisort($prices, SORT_DESC, $inventory);
$types = array_map(strtolower, array_column($inventory, 'type'));
$inventory_types = array_multisort($types, SORT_ASC, $inventory);
array_multisort(array_map(function($element) {
return $element['order'];
}, $array), SORT_ASC, $array);
print_r($array);
$keys = array_column($array, 'Price');
array_multisort($keys, SORT_ASC, $array);
print_r($array);
usort($myArray, function($a, $b) {
return $a['order'] <=> $b['order'];
});
function sortByOrder($a, $b) {
return $a['order'] - $b['order'];
}
usort($myArray, 'sortByOrder');