Switch?

When I add this to my simple page, the whole page turns white… Any idea why?

#x=5

switch ($x)
{
case 5:
echo “hi world”;
break;
case 6:
echo “hey”;
break;
default:
echo “ain’t no world”;
}

Thanks!

it sounds like error reporting is off to when the page makes an error it does not show and you end up with a blank page.

I think the problem is the switch is being passed a variable that does not exist:

[php]#x=5[/php]

is being comented out did you mean to assign 5 to a variable called x? if so :
[php]
$x = 5;[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service