i want to set a default value of option box and that value is fetch from database. here is my code it works fine with number but my month are given in alphabetical order like "Jan","Feb".. here is the code I try
<?php
$month=array("Jan","Feb","Mar","Apr","May","June","July","Aug","Sep","Oct","Nov","Dec"); foreach($month as $m)
{
printf('<option value="%d"%s>%d</option>', $m, $birth[1] == $m ? 'selected="selected"' : '', $m);
}
?>