January 2012
1 post
4 tags
Generating a list of months for a select box
I came across an issue in generating a list of months for a select input. This particular issue will crop up on the 29th, 30th and 31st of any month. The code I was using is below: <select name="fld_month" id="fld_month">   <?php for ($x=1;$x<=12;$x++){ ?>     <option value="<?php echo $x; ?>"><?php echo date( 'M', mktime(0, 0, 0, $x) ); ?></option>  ...
Jan 30th