Skip to content

Instantly share code, notes, and snippets.

@wilcorrea
Forked from IgorDePaula/data_periodo.php
Created January 16, 2017 16:12
Show Gist options
  • Select an option

  • Save wilcorrea/065afa4269ecb5b128b8a2a2ee6cb31c to your computer and use it in GitHub Desktop.

Select an option

Save wilcorrea/065afa4269ecb5b128b8a2a2ee6cb31c to your computer and use it in GitHub Desktop.
<?php
$datas = new DatePeriod(new DateTime('2015-01-30'), new DateInterval('P1M'), 10);
foreach ($datas as $data) {
echo $data->format('d/m/Y'), '<br>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment