Tuesday, November 27, 2012

strtotime

$startDate="01/01/2007";
$endDate="01/08/2007";
$startD = strtotime($startDate);
$endD = strtotime($endDate);
$diffSeconds = $endD - $startD;
$days = ($diffSeconds / 86400);
for ($wd = 1; $wd < $days; $wd++)
        {
                $weekdays = ($startD + 86400*($wd));
                echo date("d-m-Y",$weekdays) . "<br />";
        }

No comments:

Post a Comment