What is Calendar cal days in month in PHP
In this article I am going to explain about cal_days_in_month function in PHP
PHP Calendar cal_days_in_month() Function
This function will return the number of days in the month of the year for a given calendar.
Syntax of cal_day_in_month function
cal_days_in_month(calendar, month, year) |
Parameters in cal_day_in_month function
It have three parameters and all parameters is requried.
Parameter |
Description |
calendar |
It is used for calculation. |
month |
It specified month in selected calendar. |
year |
It specified year in selected calendar. |
Example of cal_day_in_month function
<html>
<body>
<?php
$daysval=cal_days_in_month(CAL_GREGORIAN,7,2012);
echo("There was $daysval days in July 2012");
?>
</body>
</html>
|
Output:
You may also want to read these related articles :here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here