} ?> </td> </tr> <?php } } else { $users = User::getDivUsers($_SESSION['user']->getDivision()); if ($_SESSION['user']->getDivision()->hasSubDivisions()) { foreach ($_SESSION['user']->getDivision()->getSubDivisions() as $division) { foreach (User::getDivUsers($division) as $user) { $users[] = $user; } if ($division->hasSubDivisions()) { foreach ($division->getSubDivisions() as $div) { foreach (User::getDivUsers($div) as $user) { $users[] = $user; } } } } } ?> <tr> <th>Name</th> <th>Rank</th> <th>Clearance</th> <th>Merits</th> <th>Option(s)</th> </tr> <?php