<th>Flight Number</th> <th>Origin</th> <th>Destination</th> <th>Airline</th> <th>Departure Time</th> <th>Arrival Time</th> <th>Status</th> <th>Actions</th> </tr>'; if ($flights && count($flights) > 0) { foreach ($flights as $flight) { echo "<tr>"; echo "<td>" . $flight->flight_number() . "</td>"; echo "<td>" . $flight->origin() . "</td>"; echo "<td>" . $flight->destination() . "</td>"; echo "<td>" . $flight->airline_name() . "</td>"; echo "<td>" . $flight->departure_time() . "</td>"; echo "<td>" . $flight->arrival_time() . "</td>"; echo "<td>" . $flight->status() . "</td>"; echo "<td> <a href='flightsAdmin.php?step=editFlight&flight_number=" . urlencode($flight->flight_number()) . "'>EDIT</a> <a href='flightsAdmin.php?step=deleteFlight&flight_number=" . urlencode($flight->flight_number()) . "'>DELETE</a></td>"; echo "</tr>"; } } else { echo "<tr><td colspan='7'><center>There aren't any flights at this time.</center></td></tr> "; } ?> </table> <br> <br> <div style="text-align: right" ><a href="flightsAdmin.php?step=createFlight">+ Add New</a></div> <?php