Re: [PHP] switch structure...
I have a switch setup similar to: Under case 0, I'd like to do a few things, and then if a certain condition is met, move into case 1. Is this possible? Am I off the wall here? Is there a better way of doing this madness I've come up with? Just do a conditional break. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] switch structure...
On 19 Jun 2003 at 13:52, Dan Joseph wrote: Hi All, Looking for some guidance on something I want to be able to do with switch, and I don't think it exists, but I'd like to consult the list as a last resort. I have a switch setup similar to: switch ($step) { case 0 : blah... break; case 1 : blah... breakl } Under case 0, I'd like to do a few things, and then if a certain condition is met, move into case 1. Is this possible? Am I off the wall here? Is there a better way of doing this madness I've come up with? -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php case 0: blah blah blah. if (my condition == false) break; case 1: blah blah .. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] switch structure...
Hi, Just do a conditional break. case 0: blah blah blah. if (my condition == false) break; case 1: blah blah .. Oh... you know, I've gotta stop leaving my brain at home. Thanks Chris, R'twick.. It sure is a relief to know that this list is here when I'm having bad PHP days.. which lately, is everyday... This solved my problem perfectly. -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] switch structure...
Oh... you know, I've gotta stop leaving my brain at home. Thanks Chris, R'twick.. It sure is a relief to know that this list is here when I'm having bad PHP days.. which lately, is everyday... This solved my problem perfectly. np. We've all had our brain fart days. Or weeks. :p Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php