php get quarter of year code example Example: php grab year from date $year = date("y",strtotime($mydate));