Lets suppose start time= 2200 and end time= 0500. In PhP how can we check a given time is between start and end time? I only want to check the time, regardless of the date.
Asked
Active
Viewed 47 times
1 Answers
2
if(date("Hi") >= 500 && date("Hi") <= 2200)
And since your minutes are 00 you can do
if(date("H") >= 5 && date("H") <= 22)

Hanky Panky
- 46,730
- 8
- 72
- 95