Tutorial Discussions |
| Embedding Dynamic © CopyRight in a web page |
| The code calculates the current year, checks whether it’s different from a fixed year (represented by $startYear), and displays the appropriate year range in a copyright statement. As you can see from the page source view at the bottom right of the figure, there’s no trace of PHP in what’s sent to the browser. The only clue that PHP has been used to generate that part of the page lies in the white space between the date range and the surrounding text, but that doesn’t affect the way it’s displayed because browsers ignore anything more than a single space in XHTML. |
|