Wrote the following code, but - the void

if(date('H:i') >= strtotime('19:00') && date('H:i') < strtotime('10:00')){ print '<div class="schedule closed">Сейчас закрыты</div>'; } 
  • Give the date in the timestamp: strtotime(date("H:i")) - Vladislav
  • Instead of date ('H: i') use time () - Maxim Stepanov

1 answer 1

You can compare strings:

 if (date('H:i') >= '19:00' || date('H:i') < '10:00') { print '<div class="schedule closed">Сейчас закрыты</div>'; } 
  • if (date('H:i') >= '19:00' || date('H:i') < '10:00') - someone earned?) - Manitikyl