Let's say I have an array as follows:
$food['fruit'] = array('apples','oranges','bananas');
$food['veg'] = array('potatoes','onions','peppers');
$food['meat'] = array('bacon','beef','chicken');
How would I go about ordering it such that any given type of food would be brought to the top of the array and the rest of the order remains intact?
So if the user selected 'veg' it'd change the order to:
$food = array('veg' => ..., 'fruit' => ..., 'meat' => ...);