Posted on Leave a comment


I 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 } ?>

And that is why you shouldn’t code tired.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.