Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

year dropdown loop in php

foreach(range(2014, 2015) as $year){
    foreach(range(1, 12) as $month){
        echo date('Y.m.d', strtotime('Last day of ' . date('F', strtotime($year . '-' . $month . '-01')) . $year)) . PHP_EOL;
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #year #dropdown #loop #php
ADD COMMENT
Topic
Name
1+8 =