PHP to obtain the day of the Week program. In php, we want to obtain the day of the week, which can be operated by using the date function. next I will summarize the specific operation methods for you, I hope this method will be helpful to all of
This example summarizes the PHP date manipulation techniques. Share to everyone for your reference, specific as follows:
1. PHP converts the date format obtained in the form into a unified format
2015-9-9 is unified into 2015-09-09 so in the
PHP provides us with a large number of functions to get the day of the week, we commonly use the date () function, let me introduce the date of the week to get a specific instance.
PHP date () parameter description
Here the main use of the W this
: This article mainly introduces how many months does PHP last from Monday to Sunday ?, If you are interested in the PHP Tutorial, refer.
Header ("content-type: text/html; charset = utf-8"); date_default_timezone_set ('prc'); functiongetWeek ($
In PHP we want to get today is the day of the week can be directly using the DATE function to operate, the following I will give you a summary of the specific methods of operation, I hope this method for friends to help.
PHP Gets the week method
This article describes the PHP time function usage. Share to everyone for your reference, specific as follows:
PHP has a UNIX timestamp related operation function, easy to use
Time () returns the current Unix timestamp
Microtime--Returns the
An example of conversion between a PHP timestamp and a date. 1. in php, the time conversion function strtotime ("today") date (Y-m-dH: I, $ unixtime) 2. to obtain the unix timestamp of today in php, you can use $ todaytimestrtot
1. time conversion
In php, if we want to obtain the day of the week, we can directly use the date function for operations. Next I will summarize the specific operation methods for you. I hope this method will help you.
PHP provides a brief introduction to how to get
This article summarizes the PHP date manipulation techniques. Share to everyone for your reference, as follows:
1. PHP converts the date format obtained in the form into a uniform format
2015-9-9 all unified into the 2015-09-09 so in the database
PHP date () parameter descriptionThe w parameter is mainly used here. The explanation of this parameter is:W indicates the day of the week, and the number indicates 0 (Sunday) to 6 (Saturday)With this, it is very easy. The author directly posts the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.