I had a hiccup in my code somewhere and got the syntax wrong so my dates don’t work for
some reason or another. I pretty sure its a syntax flaw with strtotime. I don’t think its
using my integer like I thought it would. Could someone take a look and tell me how to fix
this?
<td>
<select name="bday[month]" id="bday[month]">
<?php foreach( range(1,12) as $month) { echo "<option value='$month'>".date('M', strtotime($month))."</option>\r\t\t\t"; } ?>
</select>
<select name="bday[day]" id="bday[day]">
<?php foreach( range(1,31) as $day) { echo "<option value='$day'>$day</option>\r\t\t\t"; } ?>
</select>
<select name="bday[year]" id="bday[year]">
<?php foreach( range(date('Y')-13, 1900) as $year) { echo "<option value='$year'>$year</option>\r\t\t\t"; } ?>
</select>
</td>
strtotime()needs more than just the month digit.I’d suggest using
mktime()instead.