note 104368 modified in function.strtotime by danbrown
| From: | danbrown@php.net | Date: | Sat, 11 Jun 2011 13:50:42 +0000 |
| Subject: | note 104368 modified in function.strtotime by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-180433@lists.php.net to get a copy of this message | ||
Strtotime() can be used to loop through date range.
as follows
<?php
$start = strtotime('2009-02-01');
$end = strtotime('2009-03-10');
$date = $start;
while($date < $end)
{
//write your code here
$date = strtotime("+1 day", $date);(counter)
}
?>
--was--
Strtotime() can be used to loop through date range.
as follows
<?php
$start = strtotime('2009-02-01');
$end = strtotime('2009-03-10');
$date = $start;
while($date < $end)
{
//write your code here
$date = strtotime("+1 day", $date);(counter)
}
?>
http://www.lampdeveloperworld.in
http://php.net/manual/en/function.strtotime.php