Created
March 11, 2019 14:37
-
-
Save hans2103/4f528d9b2f99a393838c1d096f123f0c to your computer and use it in GitHub Desktop.
RSForm Pro - auto-generate list of years
This file contains 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
//<code> | |
$items[] = array(); | |
$items[] = "|Select your birth year"; | |
$currentYear = date(Y); | |
foreach (range(1930, $currentYear) as $year) { | |
$items[] = $year; | |
} | |
$items = implode("\n", $items); | |
return $items; | |
//</code> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment