"Murphy was an optimist!"
DailyWTF August 5, 2008 6:33 am
Posted by Doug McCaughan in : PHP, Programming, TechnologyI wrote this piece of rocket science last night:
<select id="birthdateyear" name="birthdateyear">
<?php for($byear = date("Y",time()); $byear >= 1901; $byear--){ ?>
<option value="<?php echo $byear; ?>" <?php if($birthdateyear == $byear) echo "selected"; ?>><?php echo date("Y",mktime(12,1,1,1,1,$byear)); ?></option>
<?php } ?>
</select>
And that is why you shouldn’t code tired.
add a comment