- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
cal_days_in_month() function in PHP
The cal_days_in_month() function returns the number of days in a month for a specified year and calendar.
Syntax
cal_days_in_month(calendar,month,year);
Parameters
calendar − The calendar to be used.
month − The month to be specified.
year − The year to be specified.
Return
The cal_days_in_month() function returns the number of days in a month for a specified year and calendar.
Example
The following is an example −
<?php $res = cal_days_in_month(CAL_GREGORIAN, 3, 2018); echo "$res days"; ?>
Output
31 days
Advertisements