PHP is basically a way to change the layout of the site by only editing 2 pages. Neat huh? It is, and simple too. Just follow these simple steps to find out how it works and how changing your layout page by page nightmare will dissapear!

The first thing you should do is make a file for testing. I suggest the name test.php so you don't get confused but you can use whatever you want, just as long you don't get confused either.
Here is what we put into test.php:

<?php include('header.txt'); ?>

Testing php here! ^^ Or whatever you may wish to say.

<?php include('footer.txt'); ?>
and click save. You're probably wondering what all that include stuff means right? Simple, to include the header.txt and footer.txt in that file or directory!
Easy so far right? Right, now for the next step, making the include files.

As you may know from the previous step, we need to make the header.txt and footer.txt and we will do that now.
We're going to start with header.txt, just because it's first on the list. Here is something that header.txt should look like, where you might include all your navigation and CSS codes:

Basically, the header file is where the coding that is part of your layout goes before the actual content.

The code for footer.txt is a bit less complicated though as you will find:

The footer file is similar to the header file, only you include the coding that goes after your content.

Once you have something like this for header.txt and footer.txt don't forget to save the files! If you want to have the same coding on every page (i.e. coding for the layout of your site) just include the code and changing layouts should be easy! So all you need to do is change header.txt and footer.txt next time you want to change layouts!
Note: Be sure to include your full url if some of the pages you are going to use are in folders. I should know beause when I started out this caused me a lot of trouble!