php list all days in month code example
Example 1: php days in month
// For given month
echo cal_days_in_month(CAL_GREGORIAN, 1, 2021);
// For current month
echo date('t');
Example 2: php get total amount of days in month
$DaysInCurrentMonth = date('t');
Example 3: get month days in php
echo cal_days_in_month(CAL_GREGORIAN, 8, 2009);