Forum Moderators: coopster
<?php
$site_title = "Restaurants, Pubs, Places to Eat, Food & Drink Dine with us";
$page_title = "TEST";
$main = "include('dining_include.php')"; (This is where I'm stuck)
require('include/nav2.php');
$template = file_get_contents('include/template.php');
$search = array('¦{PAGE_TITLE}¦',
'¦{MAIN_MENU}¦',
'¦{MAIN}¦'
);
$replace = array("$site_title - $page_title",
$main_menu,
$main,
);
$output = preg_replace($search, $replace, $template);
echo $output;
?>
Pop the following after your opening php tag:
error_reporting(E_ALL);
See if that throws an error.
I think you would be better off using file_get_contents [php.net] to read your template file as you have with your other file.
$main = file_get_contents('dining_include.php');
dc