This line is giving me an error.
$theSec = "$_GET['sec']" . ".php";
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /homepages/27/d115946677/htdocs/index.php on line 68
What does it mean? The whole snippet is:
<?php
//homepage code
function secCode()
{
echo("homepage");
}
//default to homepage
if(!$_GET['sec'])
{
$theSec = "index.php";
}
//choose the right section code
else
{
$theSec = "$_GET['sec']" . ".php";
}
include($theSec);
secCode();
?>