View Single Post
Old 02-16-2006, 06:24 PM   #7 (permalink)
teknomage1
Jack of all trades
 
teknomage1's Avatar
 
Join Date: Feb 2005
Location: Los Angeles
Posts: 598
teknomage1 is on a distinguished road
Send a message via AIM to teknomage1
That's cool that it all makes sense. Another cool thing is that
PHP Code:
$displayYear str_pad($year2"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($curYear2"0"STR_PAD_LEFT);
   echo 
"<option value='".$displayYear."'>".$displayYear."</option>\n";
   
$curYear ++;

__________________
Stop intellectual property from infringing on me
teknomage1 is offline   Reply With Quote