Created
April 20, 2015 11:41
-
-
Save thejohn/733be0cef9546a7ff04d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select id="yy" name="yy"> | |
<option value="">--Year--</option> | |
<?php | |
$startYear = 1920; /*Start counting from the year 1920*/ | |
$endYear = date('Y'); /*End count in the current year*/ | |
foreach (range($startYear, $endYear) as $year) { | |
?> | |
<option value="<?php echo $year;?>"><?php echo $year;?></option> | |
<?php | |
} | |
?> | |
</select> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment