Ok, I'm having a little trouble here. I am curious how one would go about sorting a 2d array. For example say I have an array like this:
$products = array( array ( 'tires', 5),
array( 'oil', 1),
array('battery', 3)
array('spark plugs', 6));
how would I sort them in descending order based on the numeric column so it would look like this:
spark plugs 6
tires 5
battery 3
oil 1
Thanks in advance!