[thelist] Including file using $page

Rae CosmicFawn at mystrealm.com
Sat Aug 30 18:14:50 CDT 2008

I'm guessing this is a really easy question for everyone out there but 
it seems to have me really stumped.  If I knew what words to use I could 
google it but the combinations I'm using keep telling me the same old 
thing.  I'd like to have my main index.php page, in the middle of that 
is where the content will go based on the page the person is viewing. 
Such as:

<<Header, Menu, etc>>
<?php include ("pages/$page.php"); ?>
<<Footer, etc>>

How do I define $page so that it pulls the appropriate page from within 
my pages/ directory.  I've seen the outcome used in the url such as:


And is this the best way to achieve this?  Any help is appreciated!


More information about the thelist mailing list