Im tying to create a case statement that includes files for simple site navigation and easy update I have some fields in an MySQL database that i want to place in the case statement so that by adding links to a database i can create the case statment on the fly. here is the code i have tried:
sql_query("scs", "SELECT * FROM
site_navigation");
$count_1 = 1;
switch($action)
{
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
case $row["switch"]:
include $row["include"];
break;
$count_1++;
}
default:
include ("main.php");
break;
}
I dont even now if im on the right track by doing it this way. This is the error i receive:
Parse error: parse error, expecting T_CASE' orT_DEFAULT' or `'}'' in /home/ash/public_html/scs/index.php on line 84
line 84 is the while($result.....
Im new to PHP and programming in general and cant find any references to what T_CASE or T_DEFUALT are!
please help
regards
Ash