Possible Duplicate:
How do I use PHP to get the current year?
2009 this year, 2010 next year.
Possible Duplicate:
How do I use PHP to get the current year?
2009 this year, 2010 next year.
Look at the functions date() and strtotime():
echo date('Y');
echo date('Y', strtotime('+1 year'));
You can use the date function to extract a part of a date:
$year = date("Y"); // get the year part of the current date
$nextYear = $year + 1;
Run the snippet here.
<?php
$date="2010-04-30";
$y = date('Y',strtotime($date));
echo $y;
?>