- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$start = strtotime(date('2020-06-01 12:00'));
for($x = 1; $x<=10; $x++) // increment $x until 10
{
$period = $start - ($x * 1209600); // 1209600 is equivalent to 14 days. Multiply by $x
$period_end = date('Y-m-d H:i', strtotime(date('Y-m-d H:i', $period). ' + 13 days'));
echo date('Y-m-d H:i', $period) . " - " . $period_end ."<br>\n";
}