<?php
$starttime = strtotime('09:00AM');
$endtime = strtotime('05:00PM');
while ($endtime >= $starttime) {
echo date('ga', $starttime).'<br>';
$starttime = $starttime + 3600;
}
?>
in the above code i am adding 3600 to $starttime which is equal to 1 Hour(60*60), So the way you want to make any increment just add that much seconds.
No comments:
Post a Comment