View Single Post
Old 09-26-2007, 11:38 PM   #4 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

Or, even less function calls (aka. why call date('Y') twice?):
PHP Code:
<select>
    <?php for ($iYear date('Y'), $iEndYear $iYear 10$iYear <= $iEndYear$iYear++) : ?>
        <option><?php echo $iYear?></option>
    <?php endfor; ?>
</select>
But yes, using the range is very helpful in many circumstances.
Salathe is offline  
Reply With Quote