View Single Post
Old 12-31-2008, 05:16 AM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,706
sde is on a distinguished road
hmm .. what exactly are you working on? .. a normal web site? can you show any examples of what you're talking about?

i could take a guess at what you're trying to achieve, but it would probably be way off cause i'm not certain what you're talking about.

Maybe you're in need of a templating system, or maybe you're just looking for an alternate way of doing things? There's a million ways to architect re-usable headerr/nav/footers in a site, ... here's one very simple example.

includes/global_header.php
PHP Code:
<html>
<title><?php echo $page_title?></title>
<body>
  <h1>My Cool Site</h1>
  <div class="nav">
    <a href="/">Home</a>
    <a href="some_page.php">Some Page</a>
  </div>
includes/global_footer.php
PHP Code:
<br />
&
copy 2008 All Rights Reserved
</body>
</
html
some_page.php
PHP Code:
<?php
$page_title 
"Some Page";

include 
'includes/global_header.php';
?>

This is some page ...

<?php
include 'includes/global_footer.php';
?>
__________________
Mike
sde is offline   Reply With Quote