this function returns the number of days in a given month, based on the calendar, month, and year that you specify
the format of this function is
Cal_days_in_month (calendar, Month, year)
This function have three parameters,
- calendar, you can fill this parameter with CAL_GREGORIAN
- month, you can fill this parameter with month (1 - 12)
- year, you can fiil this parameter with 4 digits of year (2008)
$days = cal_days_in_month(CAL_GREGORIAN, 1, 2009) ;
echo "In January 2009 there were $days days";
?>
that example will display
In january 2009 there were 31 days
No comments:
Post a Comment