Generally I like to have header and footer, but you should look at the
template engines out there (smarty for example) for some inspiration.

This for example, would work fine for a WIDE range of pages:

file.php?include=something:

<?
$include = $_GET['include'];
$file = "path/to/my/dir/{$include}.html";
if(!file_exists($file)) { $file = "path/to/my/dir/error.html"; }
?>
<html>
...
<? include($file); ?>
...
</html>


Some prefer one style others prefer another.


Justin


on 23/09/02 3:46 PM, Patrick Lebon ([EMAIL PROTECTED]) wrote:

> Is there a way to create a layout file that can wrap around other pages with
> data in them. I am currently using two includes (one at the start of the
> page and one at the end) but was wondering if there is a better way to do
> this.
> Thanks
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to