freshJet Posted January 28, 2012 Report Posted January 28, 2012 I've got an arrivals board with latest flights but I want it to display whether it's early, on time or delayed. Here's my code: $actualtime = $pirep->flighttime; $schedtime = $schedule->flighttime; if($actualtime < $schedtime){ echo '<td>Early</td>'; } elseif($actualtime > $schedtime){ echo '<td>Delayed</td>'; } else { echo '<td>On Time</td>'; } It only shows it as delayed at the moment though. Anyone help? http://www.freshjetvirtual.com/ Quote
Txmmy83 Posted February 2, 2012 Report Posted February 2, 2012 i think their have to be a second elseif for the "on time" with something like ($actualtime <= $schedtime) best regards Thomas Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.