Home › Forums › Resources › How to use PHP Includes for the Header and Footer
This topic contains 0 replies, has 1 voice, and was last updated by Support 3 years, 8 months ago. This post has been viewed 5757 times
Hello, if you’re going to create your website using PHP (make sure your server supports PHP), you can easily create “include” files for the Header/Footer.
1) Create 2 files: header.php and footer.php.
2) Copy all the content from of the header (the <HEADER> element) and paste in the header.php file:
3) Do the same with the <FOOTER> element, pasting in the footer.php file.
4) Now in all the HTML files, you just have to remove the HEADER/FOOTER elements and start to use the include files, like this: