E-mail This Tutorial to friend Share with friends | Bookmark This Tutorial Save Tutorial | Bookmark This Tutorial Bookmark Tutorial | Report This TutorialReport Error | Share Tutorial | Share This On Twitter |
WorstNot so goodOKPretty GoodExcellent
arrow 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.
notes Questions Sent Here notes Email To friend notes Report Error