echo '</div>'; if (!isset($_GET['v']) || $_GET['v'] == '0') { try { $majors = $t->getAirports(); if (!$majors) { echo 'No major airports available'; } else { foreach ($majors as $major) { echo '<h4>' . $major->name . '</h4>'; $sectors = $t->getSectorTypes($major->icao); if ($sectors) { foreach ($sectors as $sector => $call) { $students = array(); $not = array(); $check = array(); $vals = $t->getValidatedSector($major->icao, $sector); //get list of validations by sector // echo '<pre>'; // print_r($vals); // echo '</pre>'; if ($vals) { foreach ($vals as $val) { if ($t->maxValidatedSectorType($major->icao, $val->cid)->position_type_id == $val->position_type_id) { //Makes sure the sector type is the highest for this cid and icao $not[] = $val->cid; if (!in_array($val->cid, $students)) { $students[] = $val->cid; } //if!inarray } //if$t