Update Your Website Footer Dynamically With Javascript and PHP

It’s already December 30, 2014 now, yes, two days from now the year has changed to 2015. Usually dynamic websites always follow developments, and can always look up to date even though they are not changed manually. Yes, that’s the nature of dynamic websites, it’s easier to make changes.

Usually the date in the footer, to be precise in the copyright section, is always filled with the current year. At the end of this year, have you prepared the changes for the year for your website footer?

Date Time Year Footer

If not, you can use the Javascript or PHP script below so that the year writing on your website automatically changes when you enter a new year. Usually website owners forget this little thing, they don’t make the year change dynamically, and make the website look old.

Read also:

Review of 2013 Web Design Trends
Trend Web Design 2012 version of T-WD
There are several examples that you can follow, just copy and paste them into the footer of your website.

  1. Using Javascript
    For the first example you can use javascript, with javascript you can put it anywhere on your HTML web page, whatever platform you use you can put this script to display the current year.

Result: 2014

  1. Using Javascript 2
    To make it more interesting, you can add complementary words so that what appears is not only the year. Maybe you want to add copyright, and so on

© 2011, Company.
Results: © 2010-2014, Company.

  1. Using PHP
    If you use php you can put the following script in the footer of your website, or if you use a CMS like wordpress, you can simply find the footer.php file in the theme folder you are using and paste the following code.


Result: 2014

  1. Using PHP 2
    If you want to add additional information such as complementary words, you can follow the steps below

© <?php