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:

<p> Copyright &copy; 2017 - <?php echo date("Y"); ?> Filnor</p>


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.