index.php:
Code: Select all
...
$return_page = "";
switch( $_GET["page"] ) {
case "home":
$return_page = "home.php";
case "register":
$return_page = "register.php";
case "about":
$return_page = "meta/about.php";
default:
"http404.php"
}
include_once($return_page);
...I tried the following but it didn't work:
index.php:
Code: Select all
<html>
<body>
...
<?php
function applyTemplate($content) {
echo $content;
}
?>
...
</body>
</html>register.php:
Code: Select all
<?php include_once("index.php");?>
<?php
$content = '
...
';
applyTemplate($content);
?>I don't know how to get around this. If you can, please help.