Hi all
I'm making a basic number array from 1 to 31 for a form with a date input.
Because I'll be entering the data from that form into a mysql database with a date field, I need leading zeros. How do I set up my array so that the numbers have leading zeros?
Here's My basic code
<?php
for($d = 1;$d<32; $d++)
{
echo "<option value=\"$d\">$d</option>\n";
}
?>