I have been learning syntax for PHP and practicing it. I come from a .NET background so masterpages always made things pretty easy for me when it came to headers and footers.
So far I have a mainHeader.php and mainFooter.php which have my head menu and my footer html. I created a mainBody.php and at the top I put
<?php include "mainHeader.php" ?>
and for the footer I put
<?php include "mainFooter.php" ?>
This worked perfectly and made me smile because my pages all came together nicely. the mainHeader has my
<body> and my mainFooter has my closing tags for those.
Is this good practice?
I include my views from my controllers. I also define file locations to make maintenance easier.
Now i have all the info i need just by including