<?phpfunction aaa($a){
switch ($x)
{
case 1:
  echo "Number 1";
  break;
case 2:
  echo "Number 2";
  break;
case 3:
  echo "Number 3";
  break;
case 4:
  echo "Number 4";
  break;
}
return $a;
}
$i = 4;
echo aaa($i);
?>
Notice: Undefined variable: x in D:\php\test\newfile.php on line 6Notice: Undefined variable: x in D:\php\test\newfile.php on line 9Notice: Undefined variable: x in D:\php\test\newfile.php on line 12Notice: Undefined variable: x in D:\php\test\newfile.php on line 15
4
请问应该怎么写不出现Notice的提示