Hey guys,
really dumb question that I know has a simple answer...
I have this loop that generates a dropdown list for years. The problem is that the first current year it grabs initially is great (06) after it is incremented, I loose my "0" before the 6.. i.e...
Returns: 06,7,8,9
Instead of: 06,07,08,09
I'm sure there's a function or something that preserves the double, but can't seem to find it.
Here's the loop
Code:
<select name="expire_year">
<?
$curYear = date("y");
$yearCount = 1;
echo "<option value='' SELECTED>- Select -</option>\n";
while ($yearCount < 10) {
echo "<option value='".$curYear."'>".$curYear."</option>\n";
$yearCount ++;
$curYear ++;
}
?>
</select>