Hello Readers's if you want to get a recursive set of dates between two given dates, For example
10-12-2105 to 19-12-2015 there are 9 days all will have different dates. By using PHP you can get this as using the code below:-
$startTime = strtotime('2010-05-01');
$endTime = strtotime('2010-05-10');
// Loop between timestamps, 1 day at a time
do {
$startTime = strtotime('+1 day',$startTime);
echo $startTime;
} while ($startTime < $endTime);
Now it will print the dates between two dates by individual days.
0 Comment(s)