HTML
<!DOCTYPE html>
<html>
<body>
<?php
$d= cal_days_in_month(CAL_GREGORIAN,2,1965);
echo "There was $d days in February 1965.<br>";
$d= cal_days_in_month(CAL_GREGORIAN,2,2016);
echo "There was $d days in February 2016.";
?>
</body>
</html>
OUTPUT
There was 28 days in February 1965.
There was 29 days in February 2016.
Get the number of days in a month for a specified year and calendar in PHP
No comments:
Post a Comment