PHP Include Files
You can insert the content of one file into another file before the server executes it, with the require() or include () function. The require() function is used to create functions, headers, footers, or elements that will be reused on multiple pages.
This can save the developer a considerable amount of time. If all of the pages on your site have a similar header, you can include a single file containing the header into your pages. When the header needs updating, you only update the one page, which is included in all of the pages that use the header.
include() and require()are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error.
When a file is included, the code it contains inherits the variable scope of the line on which the include occurs. Any variables available at that line in the calling file will be available within the called file, from that point forward.
Example :
<? include ("external_file.php");?>