August 2003
Intermediate to advanced
1104 pages
19h 27m
English
The last approach I want to discuss involves using the include and require functions. As you may recall from Chapter 7, these functions include a file in the PHP code. The file is considered to be a PHP file regardless of the extension on the name. If PHP code appears in the included file, it is surrounded by <?php and ?> tags. You may want to turn back to the functional reference to refresh yourself on the differences between include and require, but they aren't particularly important to this discussion.
Certain chunks of HTML must appear on every well-formed page. Additionally, you may develop repeating elements such as a company logo. Rather than write them into every page, you may choose to put them into a file ...