I think I know what you mean. What I do is have two files top.inc.php and bottom.inc.php (.inc just tells me its an include file, has no importance).
So top.inc.php would look like this:
PHP Code:
<?php
function header($title){
?>
<html>
<head>
<title><?php echo $title; ?></title>
</head>
// etc...
<?php
}
?>
And the bottom.php would look like this:
PHP Code:
<?php
function footer(){
?>
</html>
<?php
}
?>
Now in any page were I want that layout I do.
PHP Code:
<?php
include 'top.inc.php';
include 'bottom.inc.php';
header('My title');
// some code and more html output
footer();
?>
The reason I top and bottom have php extension and are called by a function is because otherwise people can view the entire source, not just the html.
Hope you understand what I mean
Bookmarks