1. Home
  2. Computing & Technology
  3. PHP / MySQL

Cal_days_in_month () PHP Function

By , About.com Guide

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
Explore PHP / MySQL
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. PHP Functions
  5. Calendar Days In Month - PHP Days in Month- Cal_days_in_month function PHP

©2009 About.com, a part of The New York Times Company.

All rights reserved.