hello folks
Could please anybody tell me what the best approach is to build a website which has 5 html pages all of them with the same header and footer and with only static content?
Two ideas came to my mind but i don't know which one is the best to make the code more professional in this case:

First approach: develop 5 html files

Second approach: develop one php file in which there is a header and a footer. And then make the content between the
header and footer dynamic with php in order to have the 5 html pages just in one php page.

I look forward to seeing your replies.
Thanks.

    how about you make 6 (5+1) php files. One called static, and your 5 pages.

    In static you define $header and $footer. In your 5 other pages you require your static and echo your header, paste your content, and echo your footer.

    another way is using a switch to see which page you are on. This will take 2 files, one with content, and one index. From your index require the content, and switch the $_GET['id'] var for example. Then echo the appropriate var corresponding to the id.

      Write a Reply...