That's cool that it all makes sense. Another cool thing is that
PHP Code:
$displayYear = str_pad($year, 2, "0", STR_PAD_LEFT);
is equivalent to
PHP Code:
if ($curYear < 10) {
$displayYear = "0".$curYear;
} else {
$displayYear = $curYear;
}
So now you can plug that into nudave04's loop and get
PHP Code:
while ($curYear < $endYear) {
$displayYear = str_pad($curYear, 2, "0", STR_PAD_LEFT);
echo "<option value='".$displayYear."'>".$displayYear."</option>\n";
$curYear ++;
}