Ok... I posted a little while ago needing help with PHP Classes. I went through some tutorials and I have a "pretty" good idea of how this stuff works. What I'm having problems with now though is: What is the proper way to include "content" into each page? Should I make another class for each page and extend my main class? or is there a better way to do it?
Say I want to have a fairly large page that has quite a few "case" statements (for editing, deleting, etc). How do you guys (and girls) do it?
More Class Help
Moderator: General Moderators
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
I'd say go for a templating system
Or include your class on every page and have a header and footer method like this:
Code: Select all
require_once("template.inc.php");
$template = new template();
$template -> header();
echo 'Page contents';
$template -> footer();