Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $difference = (strtotime($row['Landing']) - strtotime($row['Take_Off']);
- $hours = ceil($difference/60/60); // rounds the hours to the nearest hour.
- $minutes = (($difference - ($hours * 60 * 60))/60); // rounds the remainder of the hours to the nearest minutes.
- $time = $hours.":".$minutes; // puts a : between the hours and minutes.
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement