Answers for "for($i = $begin; $i <= $end; $i->modify('+1 day')){ echo $i->format("Y-m-d"); }"

PHP
3

php loop through every day of the year

$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");
}
Posted by: Guest on August-21-2020

Code answers related to "for($i = $begin; $i <= $end; $i->modify('+1 day')){ echo $i->format("Y-m-d"); }"

Browse Popular Code Answers by Language