1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Cal_days_in_month () PHP Function

By

Definition: The Cal_days_in_month () function returns the number of days in a given month, based on the calendar, month, and year that you specify. It is phrased as: Cal_days_in_month (calendar, ##Month, ##year) ;
Also Known As: Calendar days in month
Common Misspellings: Calender days in month
Examples:
 <?php 
 $num = cal_days_in_month(CAL_GREGORIAN, 5, 1979) ; 
 echo "There were $num days in May 1979"; 
 ?> 
This will return: There were 31 days in May 1979
Related Video
How to Create a PHP Calendar
Basic PHP Syntax
  1. About.com
  2. Technology
  3. PHP / MySQL
  4. PHP Functions
  5. Calendar Days In Month - PHP Days in Month- Cal_days_in_month function PHP

©2014 About.com. All rights reserved.