personally I would use
date("Y") so you have the 4 digit year. since they don't start with "0" you won't have this problem.
you could also create a string array with predefined dates:
PHP Code:
<?
$years = array("06","07","08","09","10");
foreach ($years as $year) {
echo "<option value='".$year."'>".$year."</option>\n";
}
?>
or str_pad if you want to keep using your way
PHP Code:
<?
$year = date("y");
while($year < 10) {
$year = str_pad($year, 2, "0", STR_PAD_LEFT);
echo "<option value='".$year."'>".$year."</option>\n";
$year++;
}
?>
hth
