$main_dishes = array('cuke' => 'B', 'stomach' => "B", 'tripe' => 'C', 'taro' => 'S', 'giblets' => 'E', 'abalone' => 'F');print '';$selected_options = array();foreach ($defaults['main_dish'] as $option) { $selected_options[$option] = true;}foreach ($main_dishes as $option => $label) { print ' if ($selected_options[$option]) { print ' selected="selected"'; } print '>' . htmlentities($label) . ''; print "\n";}print '';?>