php days in month
snippet in php

php days in month

user2515

// For given month
echo cal_days_in_month(CAL_GREGORIAN, 1, 2021);
// For current month
echo date('t');

get month days in php

user2526

echo cal_days_in_month(CAL_GREGORIAN, 8, 2009);

php get total amount of days in month

user7733

$DaysInCurrentMonth = date('t');