How to Automatically Add the Current Year in PHP

Happy New Year. In this lesson we cover how to automatically add the current year to your copyright. Quite appropriate for today!

The magic of using a server-side language like PHP is that we can automate many processes.

At this time of year, I can imagine that many sites will have the incorrect year displayed in their copyright message, especially if they are standard HTML sites.

Using a simple line of PHP code we can automatically add the copyright year.


   &copy; 2015 Coding Academy


   &copy; <?php echo date("Y") ?> Coding Academy

Want to Learn More?

Become a member and get access to the member only area of this site here.


Your email address will not be published.

PHP for Beginners

Enrol in the full course here


Coming soon, a full course on using PHP, MySQL and PDO. Be notified as soon as the course goes live.