Re: Two cases going to same case?
| From: | Tom Rogers | Date: | Sun, 30 Jun 2002 12:10:18 +0000 |
| Subject: | Re: Two cases going to same case? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-104565@lists.php.net to get a copy of this message | ||
Hi
One way to achieve the same effect:
fallthru = 0;
switch($whatever){
case "1":
do something1;
$fallthru = 1;
case "2":
if(!$fallthrough){
do something2;
}
case "3"
do something3;
break;
}
Tom
At 05:18 AM 30/06/2002 -0400, Leif K-Brooks wrote:
I have a switch in a script I'm working on. I need to have case 1 and 2 both to to case 3, but without case 1 going through case 2. Is this possible? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php