Posted on

DailyWTF

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 } ?>
</select>

And that is why you shouldn’t code tired.

Leave a Reply