Jump to content

Text not in the correct place in table [Delete this topic please]


Recommended Posts

Posted

I have tried my best coding a live flight board type of thing and for some reason everything is in the wrong place ??

5FRblyX.png

and the code for it:

<table style="border:1px solid grey;" cellspacing="5" cellpadding="10" bgcolor="#E0EBEB">
<tr>
<th width="10%" align="center" style="background-color: #116ed8;">Flight</th>
<th width="10%" align="center" style="background-color: #116ed8;">Departure</th>
<th width="10%" align="center" style="background-color: #116ed8;">Arrival</th>
<th width="20%" align="center" style="background-color: #116ed8;">Pilot</th>
<th width="18.5%" align="center" style="background-color: #116ed8;">Status</th>
</tr>
<?php

$results = ACARSData::GetACARSData();

if (count($results) > 0)
{
foreach($results as $flight)
{

?>
<tr>
<td align="center"><?php if($flight->phasedetail == "Boarding"); elseif($flight->phasedetail == "Preflight"); elseif($flight->phasedetail == "Arrived"); elseif($flight->phasedetail == "On Approach"); elseif($flight->phasedetail == "Cruise"); elseif($flight->phasedetail == "Descending"); elseif($flight->phasedetail == "Pushing Back"); elseif($flight->phasedetail == "Taxiing to Runway"); elseif($flight->phasedetail == "Climbing"); elseif($flight->phasedetail == "Taxiing to Gate"); elseif($flight->phasedetail == "Paused"); elseif($flight->phasedetail == "Level Flight"); elseif($flight->phasedetail == "Taking Off"); elseif($flight->phasedetail == "Cruising"); elseif($flight->phasedetail == "Airborne"); elseif($flight->phasedetail == "Departing"); elseif($flight->phasedetail == " Initial Approach"); elseif($flight->phasedetail == "Final Approach"); elseif($flight->phasedetail == "En Route"); elseif($flight->phasedetail == "Initial Approach"); elseif($flight->phasedetail == "Landed"); elseif($flight->phasedetail == "On Stand"); ?></td>
<td align="center"><?php echo $flight->flightnum;?></td>
<td align="center"><?php echo $flight->depname;?></td>
<td align="center"><?php echo $flight->arrname;?></td>
<td align="center"><?php echo $flight->pilotname;?></td>
<td align="center"><?php if($flight->phasedetail
!= 'Paused') { echo $flight->phasedetail; }
else { echo "Paused"; }?></font></td>
</tr>
<?php
}
} else { ?>
<center><tr><td width="20%" colspan="6" style="padding: 5px; font-size: 13px; font-style:italic; font-family:open sans ;"><font color="#116ed8">No Flights in Progress!</font></td></tr></center>
<?php
}
?>
</table>

Please Help

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...