Auto Populate Year Range in PHP

by on October 25th, 2007

Building a ‘Year drop down list’ can be a boring task. And you have to change it manually after every year. Douh! Here is a PHP easy way to auto populate years list and you can adjust the starting year.

PHP Year Drop Down Autopopulated List Code
echo "";
foreach ($years as $value) {
echo "\n";
echo '';
Manual Year Drop Down List Code