Re: for loop inside a switch

From: Date: Sun, 02 Sep 2007 21:28:43 +0000
Subject: Re: for loop inside a switch
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-261620@lists.php.net to get a copy of this message
On Fri, 31 Aug 2007 22:05:11 -0700, jekillen wrote: >You can run a switch inside a for loop and when a case is matched set >a variable to true. >the break statement will break out of the switch, then inside the >iteration code, after the switch block, test the variable for true. If >it is true the use another break instruction. >That should break out of the loop altogether at the end on that >particular iteration. Ahhhh.... The *GoTo* solution. :-) Jonesy

« previous php.general (#261620) next »