get date in year month day php code example
Example 1: php get year
<?php echo date("Y"); ?>
Example 2: php days in month
// For given month
echo cal_days_in_month(CAL_GREGORIAN, 1, 2021);
// For current month
echo date('t');
<?php echo date("Y"); ?>
// For given month
echo cal_days_in_month(CAL_GREGORIAN, 1, 2021);
// For current month
echo date('t');