Skip to content

Get the current year in PHP

If you have a website with PHP that has a copyright notice, you may had the problem that you had to update the year in that notice. But PHP’s date() method can do that task for you. Here’s an example of such a copyright notice:

[sc name=”src” url=”https://stackoverflow.com/questions/64003/how-do-i-use-php-to-get-the-current-year” ]

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.