$dayselect = "<select name=\"day\">\n";
$dayselect .= "<option value=\"\"> </option>\n";
for($num = 1; $num <= 31; $num++) {
$dayselect .= "<option value=\"$num\">$num</option>\n";
}
$dayselect .= "</select>";
results in single numeric value for digits less than 10 - is there a way to make 1 to 9
01 to 09 instead?
One way:
if ( $dayselect < "10" ) {
$dayselect = "0" . $dayselect
}
but there must be better ways?