'All'); foreach ($slas as $sla) { // Set a default type, if we know about it, it will be overwritten below. $text = 'Unknown'; $sla_type = $sla['rtt_type']; if (!in_array($sla_type, $sla_types)) { if (isset($config['sla_type_labels'][$sla_type])) { $text = $config['sla_type_labels'][$sla_type]; } } else { $text = ucfirst($sla_type); } $sla_types[$sla_type] = $text; } asort($sla_types); $status_options = array( 'all' => 'All', 'up' => 'Up', 'down' => 'Down', ); echo "SLA » "; // SLA Types, on the left. $sep = ''; foreach ($sla_types as $sla_type => $text) { if (!$vars['view']) { $vars['view'] = $sla_type; } echo $sep; if ($vars['view'] == $sla_type) { echo "'; } $sep = ' | '; } unset($sep); // The status option - on the right echo '