You can create one php file for the header and another for the footer, and use php includes to integrate these into every website page on your site.
Just a suggestion: take a look at the Worpress install. They do this exact thing with php header and footers.
it just like @interkiwiwebdevelopers says, you can just make header & footer file separately, then you can just include that file in every page you make, so if you need update header & footer, you just update 2 file, not the whole source.
You can use server side include, read here http://httpd.apache.org/docs/1.3/howto/ssi.html However, SSI is certainly not a replacement for CGI, or other technologies used for generating dynamic web pages. But it is a great way to add small amounts of dynamic content to pages, without doing a lot of extra work.