At 5:18 AM -0400 6/30/02, 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?
No, but you can do it this way: switch ($foo) { case 1: ... do_something(); break; case 2: ... do_something(); break; case 3: do_something(); break; } function do_something() { # this is the stuff that you want to do that is common to your # cases 1, 2 and 3 } This accomplishes the same thing. -steve -- +------------------------------------------------------------------------+ | Steve Edberg [EMAIL PROTECTED] | | University of California, Davis (530)754-9127 | | Programming/Database/SysAdmin http://pgfsun.ucdavis.edu/ | +------------------------------------------------------------------------+ | The end to politics as usual: | | The Monster Raving Loony Party (http://www.omrlp.com/) | +------------------------------------------------------------------------+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php