Published
- 1 min read
php loop through every day of the year
The solution for this is noted below
php loop through every day of the year
Solution
$begin = new DateTime( "2015-07-03" );
$end = new DateTime( "2015-07-09" );
for($i = $begin; $i <= $end; $i->modify('+1 day')){
echo $i->format("Y-m-d");
}
Try other methods by searching on the site. That is if this doesn’t work