Skip to content

Instantly share code, notes, and snippets.

@jeremymcminn
Last active August 29, 2015 13:56
Show Gist options
  • Select an option

  • Save jeremymcminn/8962200 to your computer and use it in GitHub Desktop.

Select an option

Save jeremymcminn/8962200 to your computer and use it in GitHub Desktop.
<?php
$begin = new DateTime('now');
$beginformat = $begin->format("Y-m-d");
$beginfinal = strtotime($beginformat);
$end = $begin->modify("+90 day");
$endformat = $end->format("Y-m-d");
$endfinal = strtotime($endformat);
for ($i=$beginfinal; $i<=$endfinal; $i+=86400) {
echo date("Y-m-d", $i).'<br />';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment