<th>Number of Stops</th> <th>Price range</th> <th>Seats Left</th> <th colspan="2">op</th> </tr> <?php include_once "models/PlaneModel.php"; $plane = new PlaneModel(); for ($v = 0; $v < $list->count(); $v++) { $flight = new Flight(); $list->seek($v); $flight = $list->current(); $highprice = $plane->getHighestPrice($flight->planeID); $lowPrice = $plane->getLowerPrice($flight->planeID); $range = "£{$lowPrice} to £{$highprice}"; $arrparam = new ArrayIterator(); $idflight = $flight->Id; $link = "<a class='btn btn-primary btn-small' href='?url=Booking&action=Flight&id={$idflight}'>Book Now</a>"; if ($highprice == $lowPrice) { $range = "£{$highprice}"; } $sn = $v + 1; $name = $plane->GetName($flight->planeID); echo "<tr>\r\n <th>{$sn}</th>\r\n <th>{$name}</th>\r\n <th>{$flight->from}</th>\r\n <th>{$flight->to}</th>\r\n <th>{$flight->deptureDate}</th>\r\n <th>{$flight->landindDate}</th> \r\n <th>{$flight->boardingTime}</th> \r\n <th>{$flight->Landingtime}</th> \r\n <th>{$flight->stops}</th> \r\n <th>{$range}</th> \r\n <th>Seats Left</th> \r\n <th colspan='2'>{$link} </th>\r\n \r\n </tr>"; } ?> </table>