These are awesome for making headers/footers/same thing on many pages. It will save you from having to change the same thing on many pages. Rather then doing that, with a few characters of code ( <?php include 'footer.php'; ?> ) you will only need to modify one document to change whatever it is on every page.


Lets assume this is your site and you need to modify the footer. You have over 300 pages. That would be a pain in the ass.

Code: 
<html>
<head>
<title>My Site</title>
</head>

<body>

<center>My Site Sections here: Awesome Section 1/Super cool stuff/Even better things</center>
<br><br>
This is such a super cool site that you want to copy it. Look how much info is here in my main section
<br>
<br>
Copyright 2011 My super cool site<br>
</body>

</html>
Every file will need to be made into php

First thing you need to do is make a header.php file. All the info from your header is included in that file.
Code: 
<html>
<head>
<title>My Site</title>
</head>

<body>

<center>My Site Sections here: Awesome Section 1/Super cool stuff/Even better things</center>
<br><br>
Next is the footer. Everything that you want to keep in the footer. Usually copyright info or footer links

Code: 
<br>
<br>
Copyright 2011 My super cool site<br>
</body>

</html>
w00t! almost there. Now you need to call these pages you just made.

make an index.php file and call up the files you just made. You will see using this will save you a ton of time if you have many pages.
Code: 
<?php include 'header.php'; ?>

This is such a super cool site that you want to copy it. Look how much info is here in my main section

<?php include 'footer.php'; ?>
You're not just limited to using this as a header/footer. You can use it for mid-page info as well. I use it for damn near everything.
Jesse Reviewed by Jesse on . PHP Include (How To Template Your Site) These are awesome for making headers/footers/same thing on many pages. It will save you from having to change the same thing on many pages. Rather then doing that, with a few characters of code ( <?php include 'footer.php'; ?> ) you will only need to modify one document to change whatever it is on every page. Lets assume this is your site and you need to modify the footer. You have over 300 pages. That would be a pain in the ass. <html> <head> <title>My Site</title> </head> Rating: 5