Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

loop through months and year php

$start = $month = strtotime('2009-02-01');
$end = strtotime('2011-01-01');
while($month < $end)
{
     echo date('F Y', $month), PHP_EOL;
     $month = strtotime("+1 month", $month);
}
 
PREVIOUS NEXT
Tagged: #loop #months #year #php
ADD COMMENT
Topic
Name
8+1 =