PHP is the best thing to use when you are making a website! It is so easy to do and when you are updating you just have to change one page.
Step 1: First you have to open notepad or whatever program you use for your website. Make a new dokument and paste the code under in it. This is your header.php:
Step 4: Save the dokument as footer.php.
Step 5: Now make a last new dokument and paste the code under in it. This is your index.php, remove the space between all the < and the ?.