Answers for "current year and month in php"

PHP
8

php get current year

// get current year using php
<?php echo date("Y"); ?>
Posted by: Guest on August-03-2020
0

php days in month

// For given month
echo cal_days_in_month(CAL_GREGORIAN, 1, 2021);
// For current month
echo date('t');
Posted by: Guest on January-27-2021
0

php extract month and year from date

$time=strtotime($dateValue);
$month=date("F",$time);
$year=date("Y",$time);
Posted by: Guest on April-08-2022

Code answers related to "current year and month in php"

Browse Popular Code Answers by Language