I'm having a bunch of HTML pages that are almost equal except for some minor details, like including a second CSS file, a unique title and a custom favicon. I don't like the idea of maintaining all these pages individually. A naive way to achieve what I want is to use some GET or POST parameter to differenciate the details like that:
$customization = array( "favicon" => "favicon_dummy.ico", "title" => "My Page");
if ($_GET["id"] == "my-first-page")
$customization["favicon"] = "favicon_first.ico"
if ($_GET["id"] == "my-second-page")
$customization["title"] = "My Second Page"
And then something like that:
<head>
<title><?php echo $customization["title"]; ?></title>
<link rel="shortcut icon" href="<?php echo $customization["favicon"]; ?>" type="image/x-icon" />
</head>
Now that is a pretty crude way, and I think it's error-prone. What is the correct way (TM) to achieve such tasks?