Hey guy. Im learning php, it seriously kicks…
I’m having a problem witht he switch() function though. It’s like it’s not recognizing the ‘default’ case. this is what i have…
$x = $_GET[‘x’];
switch($x) {
case 1:
echo “1”;
break;
case 2:
echo “2”;
break;
case 3:
echo “3”;
break;
default:
echo “default”;
}
but it gives me this error…
Notice: Undefined index: x in c:\Inetpub\wwwroot\adcore emp_site.php on line 10
default
line 10 being ->$x = $_GET[‘x’];
anyone? thank,
-Naaman