How to get the year number with PHP?

date, php

Solution

Look at the functions date() and strtotime():

echo date('Y');
echo date('Y', strtotime('+1 year'));

Problem

Possible Duplicate: How do I use PHP to get the current year? 2009 this year, 2010 next year.

Original source

Related problems