Dave's Brain

Browse - programming tips - php get current year

Date: 2011jan20
Language: php
Level: beginner

Q.  How do you get the current year with php?

A.  Use the date function:


	$year = date('Y');

More info
http://php.net/manual/en/function.date.php
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2012, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
Advertisements: