Sort out your Copyright notice with PHP Date()

A quick and easy improvement to your site is to make sure any copyright notices are accurate. Too often I see websites with Copyright 2006 in the footer and this makes the site look abandoned.

An easy way to solve this is to use:

{code type=php}< ? = date(“Y”) ?>{/code}

Which will output the current year. Include it in your copyright notice as follows and you will always be up to date:

{code type=php}Dev Chunks is copyright 2006 – < ? = date(“Y”) ?>{/code}


Leave a Reply

Your email address will not be published.

More Posts

How to use PHP Type Declarations

PHP has developed into a more strictly typed language in recent years. Type Declarations help with that and are a fairly new addition to PHP,


If you have come to JavaScript from a background in Java or C, then you will like the variation on the for loop. It is

Context Object Manipulation

One of the key concepts of JavaScript is the keyword this, which signifies the JavaScript context object. If you write an inner function, you can access

Polymorphic Functions

It is possible to define multiple functions with the same name in JavaScript, and the last one of those that you define will be the