379715 visitors has seen the Tim-Carter.com site. Thanks!
320 visitors has seen the Tim-Carter.com site today.
 
 
Search :  
 
>>> Programming >> PHP > How to find the number of days in a month with PHP Date (This page has been seen 728 times)

How to find the number of days in a month with PHP Date

This is an example on how to find the number of days in a month

The Code:
$Month = date("m");
$Year = date("y");
$DaysInMonth=cal_days_in_month(CAL_GREGORIAN,$Month,$Year);

echo "The month $Month has $DaysInMonth days";

Like (0)
 
Dislike (0)


Keywords for this article:
DATE || YEAR || CAL_GREGORIAN

Post comment

Name:


Comment:

Code Language:

Code:

Here you can paste a code example. It will then be processed by SyntaxHighlighter and formatted for easier readability.
Please remember to select the correct Code Language in the select above so the SyntaxHighlighter can highlight the code properly.




Code:

Please enter the code you see above

What is 3 + 7 =

Submit Comment


No one has commented on this page yet. You could be the first.


Advertisement by Google


Sponsors :