I have been trying to search a solution online and on stackoverflow but did not come across any satisfactory solution.
I wanted to know how can i include (if required) header.php
and footer.php
automatically in the new PHP pages that i create, at present whenever i create a new PHP file i manually add header.php
on top and footer.php
at the bottom, I dont really have a problem with doing this but i was wondering if this is how everyone does it and if not what is the best solution to this.
I know I could takeup any framework out there and use that because may be they include the header and footer automatically, but i am referring to custom PHP coding.
I will really appreciate views of experienced developers out there.