how to subtract a year in php using date() code example Example: php grab year from date $year = date("y",strtotime($mydate));