PHP Code:
$thisPage="page_name";
$id = $_GET['id'];
include("inc/header.inc.php");
if ($id == "de") {
include("inc/de/$thisPage.inc.php");
}
else if ($id == "gb"){
include("inc/gb/$thisPage.inc.php");
}
else {
include("inc/fr/$thisPage.inc.php");
}
include("inc/footer.inc.php");
can this be replaced with
PHP Code:
$thisPage="page_name";
$id = $_GET['id'];
include("inc/header.inc.php");
switch ($id) {
case "fr":
include("inc/$id/$thisPage.inc.php");
break;
case "de":
include("inc/$id/$thisPage.inc.php");
break;
case "gb":
include("inc/$id/$thisPage.inc.php");
break;
}
include("inc/footer.inc.php");
? ... or is there a nicer/better/shorter way do do this?
... and what would be the default index.php?
Bookmarks