Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php get all days between two dates

$period = new DatePeriod(
     new DateTime('2010-10-01'),
     new DateInterval('P1D'),
     new DateTime('2010-10-05')
);

foreach ($period as $key => $value) {
    //$value->format('Y-m-d')       
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #days #dates
ADD COMMENT
Topic
Name
4+3 =