i have a page with a birthday field in it. now i don't want to write all the option tags so i kind of used a function to do the job for me but it doesn't seem to work.
i know the function works fine so i'm guessing my syntax is off.
thanks for the help and here is the code:
Code: Select all
<tr><td>Birthday</td><td>:</td>
<td>
<select name="month">
<option value="0">Month</option>
<?php generate_options(1,12)?>
</select>
</td>
</td></tr>
Code: Select all
$return_string[]='<option value="'.$i.'">'.callback_month($i).'</option>';
Code: Select all
function callback_month($month)
{
return date('M',mktime(0,0,0,$month,1));
}