Home > Teaching > Tutorials > HTML Tutorial
<?php include("file_to_be_included.php"); ?>
This includes the entire file specified. Why is this useful? Lines of code to be included on all pages can be put in a single file, making it easy to alter an appearance on all pages very quickly -- simply alter the referenced file.
Anything not enclosed in <?php and ?> is treated as simple HTML in PHP and left alone. This means all .html files can simply be .php instead without any loss of functionality. Doing this from the beginning also means, if you do decide to start work with PHP, you need not go through the hassle of changing all the .html files to .php files (along with all the links between the pages).
Much more information and an excellent tutorial on PHP may be found on w3schools.com
|Previous: cascading style sheets||Next: ideas and styling|