$date = date("H:s");
$idat = date('00:40');
if(isset($date) && $date >= $idat) { $pub = 'the script Works'; } else { $pub = 'the script doesn't work'; }
echo $pub;
$start_time = "07:30"; // Start
$end_time = "13:15"; // End
if ((date('H:i') > $start_time) && (date('H:i') < $end_time)) {
echo 'Works';
} else { echo 'Not working'; }
Find more questions by tags PHP