Display Only Current Year With PHP

Display Year With PHP

For many who maintain web sites, even on the personal level, the change of year requires updates to pages that have the year displayed on them . Web designers who have content managers running there sites already have this issue already covered in that the content manager is already running a server side script of PHP, ASP, Perl or other that updates the displayed year.

Many web site designers, for example, have to update the copyright year displayed on their own websites, and similarly on their client’s websites. Unfortunately, many end up doing the update manually and waste a lot of time with this tedious task, but many others use a better method, and it’s as simple as single line of PHP.

Copyright <? print(Date(“Y”)); ?>

Add this simple line of php code anywhere the year needs to be displayed and no longer will you have to manually edit the footer of your websites, or other pages, with each new year that passes.

Another use of the single line of code is in META tag that uses a year, such as the copyright content meta tag :

<META NAME=”copyright” CONTENT=”Copyright ©<? print(Date(“Y”)); ?>” />

The above works really well. I wish I had done this sooner as I have so many pages on one of my sites that I have the meta copyright tad included.


A useful way to provide remote support to computer users anywhere in the world. The usefulness of remote control support has inevitably brought about quick and customer satisfying computer desktop and server support. End-users and administrators of servers, cloud computing, virtual infrastructure and other services have all benefited from remote support and it’s instrumental in keeping users productive in all sorts of environments.


About pctechgo
Work in technology field, touch many types of technologies from Exchange servers, to Citrix XenApp, virtualization like vmware, xenserver, MS hyper-V. Install servers, server apps, blackberry servers, networking hardware like Cisco switches routers, ASA firewalls, Sonicwall firewalls, and of course all levels of Microsoft from AD, DNS, to even desktops.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: