I have been using the following method for a long time now, but someone recently said to me its ugly and there are ways to do it that will perform quicker too. He mentioned using and array in a separate file but I am not familiar with this method. Can anyone give me some guidance please?
[code=php]<?php
$about = isset($_GET[‘d’]) ? $_GET[‘d’] : ‘about’;
switch($about) {
/*———————– PAGES ———————————–*/
case ‘profile’:
$title = ‘My Title’;
$keyword = ‘some keywords’;
$description = ‘A great description.’;
break;
default:
$title = ‘My Title’;
$keyword = ‘some keywords’;
$description = ‘A great description.’;
break;
}
include($_SERVER[‘DOCUMENT_ROOT’]. ‘/include/header.php’);
include($_SERVER[‘DOCUMENT_ROOT’].’/about/’ .$about.’.php’);
include($_SERVER[‘DOCUMENT_ROOT’]. “/include/footer.php”);
?>