Current location: Hot Scripts Forums » Programming Languages » PHP » Timetable problem


Timetable problem

Reply
  #1 (permalink)  
Old 05-24-05, 11:15 AM
kimandrel kimandrel is offline
New Member
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Timetable problem

Hello!

I am making a timetable to view flight from an airport. I have the strings departure_time = times departure
departure_minutt = minuttes departure
arrival_time = times arrival
arrival_minutt = minuttes arrival

In thats strings the time to the routes is writen. But it is over 1100 routes and i dont like to have all visible at same time and I would also like to have a message in "status" who said boarding if it is 30 minuttes to departure etc.

So to my question, if we use the "if" tag.
<?
$boarding = $row[departure_minutt] - 10
$gateclosing = $row[departure_minutt] - 5

<? if ($row[departure_minutt] == $boarding) {;?>
Boarding
<? } else {};?>

When I use this I only get boarding one minutte. Is it possible to make an "if" code to get it to be viewed BOARDING betwen $boarding and $gateclosing for an example.

But if the deparure is 12:05 the minutte is 5, and 5 - 10 = -5! Someone who know a way to increase hour if the minuttes go to (-)?

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 05-24-05, 12:57 PM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
http://php.net/time

the very first example might help
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.

Last edited by FiRe; 05-24-05 at 12:59 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie found a solution to a date problem. mickey_kamer Perl 4 05-09-07 06:54 AM
sql problem da.bass PHP 2 05-24-05 06:00 AM
header redirect problem loeddie PHP 2 05-18-05 12:22 PM
Count problem kasic ASP.NET 1 10-20-04 01:23 AM
Asp and Microsoft Access 2002 problem gop373 ASP 2 10-06-04 10:13 AM


All times are GMT -5. The time now is 09:56 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.