Suppose you have a copyright notice on your site that looks like this :: Copyright 1999 - 2004 PHP can automatically update this for you without any further interaction (or publishing) on your part. Then whenever your web pages are requested by a browser, PHP reads the current date on your host and delivers the result to your site. | |||||||||||||||||||
| |||||||||||||||||||
output :: Copyright 1999 - [current year is then displayed here] | |||||||||||||||||||
Copyright 1999 - 2010 | |||||||||||||||||||
Note: all PHP statements must end with a semi-colon (as in the above code). This can be easily forgotten! ;-) | |||||||||||||||||||