<?php
$fromDate = ‘01/01/2009′;
$toDate = ‘01/10/2009′;
$dateMonthYearArr = array();
$fromDateTS = strtotime($fromDate);
$toDateTS = strtotime($toDate);
for ($currentDateTS = $fromDateTS; $currentDateTS <= $toDateTS; $currentDateTS += (60 * 60 * 24)) {
// use date() and $currentDateTS to format the dates in between
$currentDateStr = date(“Y-m-d”,$currentDateTS);
$dateMonthYearArr[] = $currentDateStr;
//print $currentDateStr.”<br />”;
}
echo “<pre>”;
print_r($dateMonthYearArr);
echo “</pre>”;
?>
Thanks,
Nilesh Prajapati.



Good Work
Thank you
By: sreeja on May 22, 2009
at 10:48 am
Very useful. Your help is appreciated.
By: senthil on July 17, 2009
at 5:55 am
Very Thnx dear! gud wrk………….
By: Amardeep Singh on July 27, 2009
at 5:44 pm
Thanks ,good coding
By: milind Morey on August 13, 2009
at 8:07 am