PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php #echo (intdiv(time(),(30 * 60)) + 1); // get current time and round it to next half hour $start = (intdiv(time(),(50 * 60)) + 1) * (50*60); $end = strtotime('20:45'); // if end time less then start add one day if ($end < $start) $end += 60 * 60 * 24; while ($start <= $end) { echo date('H:i',$start) . PHP_EOL; // Increment Start date $start += (15*60); }
Show:  
Copy Clear