Time period in php

0

I have two doubts.

The first one, I have the opening and closing times of an establishment, and I have the current time, as I do an algorithm that calculates if the establishment is open or closed and returns a Boolean 'True' if it is open or Boolean 'False' if it is closed.

The second, I want an event to expire, I create events for future days, I want my program to know that it has already happened and stop displaying.

My program is made in PHP. Please help!

    
asked by anonymous 15.11.2015 / 19:50

1 answer

0

In the question of dates: You can use the SQL "now ()" function to work with time periods.

You do a query by comparing the date of the event and place it inside an array, so you only have the dates in the time period you want.

    
15.11.2015 / 20:26