Cal_days_in_month () Function

Cal_days_in_month () Function

The Cal_days_in_month () function is used to find the number of days in a given month, based on the calendar, month, and year.

Syntax : cal_days_in_month ( int calendar, int month, int year)

Example :

<?php

$output = cal_days_in_month(CAL_GREGORIAN, 3, 2000) ;

echo “There were $output days in March 2000″;

echo “<br>”;

$output = cal_days_in_month(CAL_GREGORIAN, 2, 2004) ;

echo “There were $output days in Feb 2004″;

?>

Leave a Reply


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.