// Switch statement cheks style id number and sets template acordingly :)
switch($_GET[style])
{
case '1':
$template = file_get_contents('./style1.tpl');
break;
case '2':
$template = file_get_contents('./style2.tpl');
break;
default:
$template = file_get_contents('./style1.tpl');
break;
}
// our data we want ont he page
$content = "hellloooo world!";
$content .= '
Style 1 ';
$content .= '
Style 2 ';
// Find the variable %content% and replace it with the text above. find it in the vairable $template(specified above).
// Place the new data into the variable $output. and echo it to the screen
$output = str_replace('%content%', $content, $template);
echo $output;
?>