Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

foreach date php

$begin = new DateTime('2010-05-01');
$end = new DateTime('2010-05-10');

$interval = DateInterval::createFromDateString('1 day');
$period = new DatePeriod($begin, $interval, $end);

foreach ($period as $dt) {
    echo $dt->format("l Y-m-d H:i:s
");
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #foreach #date #php
ADD COMMENT
Topic
Name
8+6 =