I\'m pretty new to php and i\'m trying to decide the best way to organize the pages and, using PHP, deliver them. The two (basic) ideas I\'ve had are:
A bunch o
The main with PHP is that you need to "KEEP THE PRESENTATION AND PROGRAM LOGIC SEPARATE". Or in other words, make sure that you aren't echoing html to the screen in the middle of the scripts that you do your business or processing logic in.
Your second solution is a fairly common (and not a bad) solution to the problem. It allows you to build a single page with all of your layout information which then includes the specific page content to be rendered. Obviously this won't work so well if you need to swap large portions of the layout template from one page to the next. In that case, your first solution would work better.
Lastly, I would strongly recommend that you take a look at the various PHP frameworks out there like Zend Framework, Symfony, or CakePHP to see how they all handle this problem. If you find one you like, then just use it. Otherwise you're still likely to get some great ideas on how to structure your own site.