Skip to content
Advertisement

Tag: php-5.4

How do I use PHP to get the current year?

I want to put a copyright notice in the footer of a web site, but I think it’s incredibly tacky for the year to be outdated. How would I make the year update automatically with PHP 4 or PHP 5? Answer You can use either date or strftime. In this case I’d say it doesn’t matter as a year is a year,

Advertisement