Case Statements - lil help please
| From: | Patrick Hartnett | Date: | Sun, 31 Mar 2002 05:03:39 +0000 |
| Subject: | Case Statements - lil help please | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-90858@lists.php.net to get a copy of this message | ||
Are case statements not implemented in PHP4?
If so, can someone help me debug this one, I seem to have some syntax incorrect, and am not sure what exactly is wrong with the statement. I get a parse error on the first line, but can't find any documentation on case statements in PHP4, so I am kinda stuck.
thanks
-Patrick
#############
// check the error code and generate an appropriate error message switch
($e) {
case -1:
$message = "No such user.";
break;
case 0:
$message = "Invalid username and/or password.";
break;
case 2:
$message = "Unauthorized access.";
break;
default:
$message = "An unspecified error occurred.";
break;
}
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com