In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you "php how to get the day according to time", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to get the day of the week according to time" this article.
Php obtains the day of the week according to time: 1, through "$weekarray [date (" w ")];" get the day of the week in Chinese; 2, through "$weekarray [date (" w ", strtotime (" xxx "))];" get the specified date.
This article operating environment: Windows7 system, PHP7.1 version, Dell G3 computer
What day is the php acquisition time?
What day of the week does PHP get the code:
Date ("l"); / / data can get English days of the week such as Sundaydate ("w"); / / this can get numeric weeks such as 123. note that 0 is Sunday.
Get the Chinese day of the week:
$weekarray=array ("day", "one", "two", "three", "four", "five", "six"); / / define an array echo "week" first. $weekarray [date ("w")]
The specified date is:
$weekarray=array ("Day", "one", "two", "three", "four", "five", "Saturday"); echo "week". $weekarray [date ("w", strtotime ("2011-11-11"))]; above is all the content of the article "php how to get the day of the week according to time". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.