how to get total month days by only month and year in php code example Example: get month days in php echo cal_days_in_month(CAL_GREGORIAN, 8, 2009);