Skip to content

Instantly share code, notes, and snippets.

@d30jeff
Created February 10, 2016 17:57
Show Gist options
  • Select an option

  • Save d30jeff/8c9a993a1fbfa5364d9a to your computer and use it in GitHub Desktop.

Select an option

Save d30jeff/8c9a993a1fbfa5364d9a to your computer and use it in GitHub Desktop.
Date now minus 4 months
<?php
foreach (range(1,4) as $index) {
$arr[] = date("m/Y", strtotime("-{$index} months"));
}
echo implode("\n", $arr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment