error in script
Posted: Thu Apr 27, 2006 11:40 am
I have just starting php and have started a small project but I keep getting an error and I can't figure it out..
error:
Parse error: syntax error, unexpected $end in /home/.bocephus/stuff/public/index.php on line 254
$level has a value of 0, 1, 3, or 5
USERLEVEL=1
STAFFLEVEL=3
ADMINLEVEL=5
error:
Parse error: syntax error, unexpected $end in /home/.bocephus/stuff/public/index.php on line 254
Code: Select all
<?php
switch ($level)
{
case USERLEVEL:
echo <<<DONE
html
DONE;
break;
case STAFFLEVEL:
echo <<<DONE
html
DONE;
break;
case ADMINLEVEL:
echo <<<DONE
html
DONE;
break;
default:
echo <<<DONE
html
DONE;
break;
}
?>USERLEVEL=1
STAFFLEVEL=3
ADMINLEVEL=5