get year in date php code example
Example 1: php grab year from date
$year = date("y",strtotime($mydate));
Example 2: how to get the current year in php
Get the current year using PHP:
<?php
echo date("Y");
?>
$year = date("y",strtotime($mydate));
Get the current year using PHP:
<?php
echo date("Y");
?>