Skip to content

Instantly share code, notes, and snippets.

@computercarguy
Created June 26, 2012 17:54
Show Gist options
  • Save computercarguy/2997469 to your computer and use it in GitHub Desktop.
Save computercarguy/2997469 to your computer and use it in GitHub Desktop.
PHP code to put a month select box into an HTML form
function MonthSelect(){
$HTMLCode = "<select name=\"month\" id=\"month\">".Chr(13);
$HTMLCode .= "<option value=\"01\">January</option>".Chr(13);
$HTMLCode .= "<option value=\"02\">February</option>".Chr(13);
$HTMLCode .= "<option value=\"03\">March</option>".Chr(13);
$HTMLCode .= "<option value=\"04\">April</option>".Chr(13);
$HTMLCode .= "<option value=\"05\">May</option>".Chr(13);
$HTMLCode .= "<option value=\"06\">June</option>".Chr(13);
$HTMLCode .= "<option value=\"07\">July</option>".Chr(13);
$HTMLCode .= "<option value=\"08\">August</option>".Chr(13);
$HTMLCode .= "<option value=\"09\">September</option>".Chr(13);
$HTMLCode .= "<option value=\"10\">October</option>".Chr(13);
$HTMLCode .= "<option value=\"11\">November</option>".Chr(13);
$HTMLCode .= "<option value=\"12\">December</option>".Chr(13);
$HTMLCode .= "</select>".Chr(13);
return $HTMLCode;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment