This article will share with you the formatting methods of several date functions. It is very simple and practical. Friends in need You can refer to it.
PHP day of the week code:
The code is as follows:
Date("l"); //data can get the English day of the week such as Sunday
Date("w"); //This can get the numerical day of the week, such as 123. Note that 0 is Sunday
Get the Chinese day of the week:
The code is as follows:
$weekarray=array("日","一","二","三","四","五","六"); //First define an array
echo "week".$weekarray[date("w")];
Obtain the specified date:
The code is as follows:
$weekarray=array("日","一","二","三","四","五","六");
echo "week".$weekarray[date("w","2011-11-11")];
The above is the content of this article about gambling. I hope you all like it.