- date: documentation ( source)
- strtotime: documentation ( source)
- sprintf: documentation ( source)
<?php
$startTime = strtotime('2013-01-01 3:00');
$finishTime = strtotime('2013-03-01 3:00');
$lastMonthDay = strtotime(sprintf('last day of Jan'), $startTime);
$dateTime = strtotime(sprintf('%s %s %s', 'Mon', $startHM, $month), $startTime);
for (;$dateTime <= $lastMonthDay, $dateTime <= $finishTime; $dateTime = strtotime('+1 week', $dateTime)) {
echo date ('d-m-Y H:i');
}