Hello everyone,

Any suggestions as to how to streamline this? Feels like I shouldn't need the extra $title etc. variables.

==

Code PHP:
<?php
 
$variables['title'] = 'default title';
$variables['content'] = 'default content';
$variables['id'] = 'default id';
 
function load($variables) {
	$title = $variables['title'];
	$content = $variables['content'];
	$id = $variables['id'];
	include 'index.html.php';
	exit();
}
 
$page = 'home';
if (!empty($_GET)) {
	$getArray =  array_keys($_GET);
	$page = $getArray[0];
}
 
switch ($page) {
 
	case 'home':
	$variables['title'] = 'home';
	$variables['content'] = 'home' . '.php';
	$variables['id'] = 'home';
	load($variables);
	break;
 
	case 'about':
	$variables['title'] = 'about';
	$variables['content'] = 'about' . '.php';
	$variables['id'] = 'about';
	load($variables);
	break;
 
	#DEFAULT#
	
	default:
	$variables['title'] = 'error';
	$variables['content'] = 'error' . '.php';
	$variables['id'] = 'error';
	load($variables);
	exit();
}
 
	/*
		'title' => 'default title'
	,	'content' => 'default content'
	,	'id' => 'default id'
	*/