Tough to explain so here's an example:
$inventory = array(
array("type"=>"fruit", "price"=>3.50),
array("type"=>"milk", "price"=>2.90),
array("type"=>"pork", "price"=>5.43),
);
I would like to sort inventory's element by price so I would like:
$inventory = array(
array("type"=>"pork", "price"=>5.43),
array("type"=>"fruit", "price"=>3.50),
array("type"=>"milk", "price"=>2.90),
);
I'm nearly positive PHP has a function to do this (I'm pretty sure I did it a while ago), but I don't remember!
Thanks all, Matt Mueller