Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   Date (http://www.go4expert.com/forums/date-t3439/)

Banda 16Mar2007 18:01

Date
 
Hi
My timetable have 5 periods on my school year. How I can check what is currently period?

pradeep 16Mar2007 18:03

Re: Date
 
Do you have some idea about going about the problem?? If you have we can elaborate/improve on your idea.

Banda 16Mar2007 18:12

Re: Date
 
Code:

$perioidstart = "1.2.2007";
$perioidend = "3.22.2007";
$today = "date("d.m.y");
if ($today > $perioidstart) {
  if ($today < $perioidend) {
    $period = 1;
  }
}

But that didn't work. Is there is something other way to do this?

Banda 16Mar2007 18:44

Re: Date
 
Now i know how to do.
Code:

date("ymd")
that is answer to this problem, or I think so.


All times are GMT +5.5. The time now is 07:29.