$month = date("m",strtotime($mydate));
$dateTime = new DateTime();
$month = $dateTime->format('m');
// For given month
echo cal_days_in_month(CAL_GREGORIAN, 1, 2021);
// For current month
echo date('t');
echo 'Day' . date('d', strtotime($row['Date']));
echo 'Month' . date('m', strtotime($row['Date']));
echo 'Year' . date('Y', strtotime($row['Date']));
cal_days_in_month(CAL_GREGORIAN, $month, $year)
$time=strtotime($dateValue);
$month=date("F",$time);
$year=date("Y",$time);
echo cal_days_in_month(CAL_GREGORIAN, 8, 2009);
$time=strtotime($dateValue);
$month=date("F",$time);
$year=date("Y",$time);