Php returns the current date or the specified date is the day of the week. Php returns the current date or the specified date is the day of the week. php obtains the code for the current PHP day of the week: Copy the code as follows: date (l ); for example, Sundaydate php returns the current date or the specified date is the day of the week.
PHP day of the week to get the code:
The code is as follows:
Date ("l"); // data can be used to obtain the week in English, such as Sunday.
Date ("w"); // you can obtain the number of weeks, for example, 123. Note that 0 is Sunday.
Get Chinese day of the week:
The code is as follows:
$ Weekarray = array ("day", "one", "two", "three", "four", "five", "six"); // define an array first
Echo "week". $ weekarray [date ("w")];
Obtain the specified date:
The code is as follows:
$ Weekarray = array ("day", "one", "two", "three", "four", "five", "six ");
Echo "week". $ weekarray [date ("w", "2011-11-11")];
I hope you will like the above.
The week Code of week PHP is as follows: date ("l"); // data can be used to obtain the week in English, such as Sunday date...