PHP to generate the date of year download list method
The example of this article describes the method of PHP to generate the download list of month and day. Share to everyone for your reference. The implementation methods are as follows:
The code is as follows:
function mdy ($mid = "Month", $did = "Day", $yid = "Year", $mval, $dval, $yval)
{
if (empty ($mval)) $mval = Date ("M");
if (empty ($dval)) $dval = Date ("D");
if (empty ($yval)) $yval = Date ("Y");
$months = Array (1 => "January", 2 => "February", 3 => "March", 4 => "April", 5 => "may", 6 => "June", 7 => "July", 8 => "August", 9 => "September", ten => "October", one => "November", => "December");
$out = ""; foreach ($months as $val => $text) if ($val = = $mval) $out. = "$text "; else $out. = "$text "; $out. = "";
$out. = ""; for ($i = 1; $i <= $i + +) if ($i = = $dval) $out. = "$i "; else $out. = "$i "; $out. = "";
$out. = ""; for ($i = date ("Y"); $i <= date ("y") + 2; $i + +) if ($i = = $yval) $out. = "$i "; else $out. = "$i "; $out. = "";
return $out;
}
I hope this article will help you with your JavaScript programming.