: This article describes how to obtain the number of days of the current month, the first and last days of the current month, the first day of the previous month, and the last day of the previous month. if you are interested in the php Tutorial,
This article mainly introduces the method by which PHP obtains the number of days of the month and the date array according to the date, related to the relevant judgment, conversion and the traversal operation of the character and array of PHP, and
: This article describes how to obtain the number of days of the month in php. For more information about PHP tutorials, see. At work, I often encounter the problem of getting the number of days in a month. I previously solved this problem.
// This
During registration, the number of days of the month changes with the change of the month. this small function is used in many places! & Lt; 5 & gt; change PHP code [php] & lt; selectname & quot; month & quot; id & quot; month & quot; onchange &
PHP uses Strtotime to get last month, next month, month's date, Strtotime last month
Write the program today, suddenly found a long time to write a long time to get the number of days of the function, the classic switch version, but to get the
This example describes how PHP obtains the number of days and date arrays by month. Share to everyone for your reference, as follows:
function Get_day ($date) { $tem = explode ('-', $date);//Cut date get year and month $year = $tem [' 0 '];
PHP obtains the date of the previous month, next month, and this month. Because the work needs to get the date of the previous month, next month, and this month, we found the implementation code from the website and shared it to help our friends
PHP$days=Cal_days_in_month(Cal_gregorian, 4, 2011); Echo"Returns the number of days in 2011-4."$days." "; $days=Date(' t ',Strtotime("2011-4-1")); Echo"Returns the number of days in 2011-4."$days." "; $days=Date("T"); Echo"Number of days in the
PHP obtains the date (strtotime (), date (), and strtotimedate of the previous month, next month, and this month. PHP obtains the date (strtotime (), date () of the previous month, next month, and this month, suddenly I found a function that was
PHP obtains the date (strtotime, date) of the previous month, next month, and this month ). When I was writing a program today, I suddenly found a function that was written a long time ago to get the number of days of the month. The classic switch
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.