Greets,
I'm trying to generate a list of years between 13 years ago, and 100 years ago from 13 years ago, and then put those years in a dropdown (hopefully in reverse order, but, I'm not picky lol). Here's the code that I came up with which needless to say isn't working.
Does anyone have any suggestions?
$this_year = date(Y);
$years_ago = $this_year - 13;
$max_year = $years_ago - 101;
$year_dropdown .= "<select name=\"year\">";
for ($i=$max_year;$i>$years_ago;$i++) {
if ($bd_y == $i) { $year_dropdown .= "<option value=\"$i\" selected>$i</option>"; }
else { $year_dropdown .= "<option value=\"$i\">$i</option>"; }
}