Generating The Days In A Week

 
<?php$now = time();if (3 < strftime('%H', $now)) { $now += 7200; }$today = strftime('%w', $now);$start_day = $now - (86400 * $today);for ($i = 0; $i < 7; $i++) {
  print strftime('%c',$start_day + 86400 * $i);
}
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.