Re: breaking out of two loops
| From: | Lars Torben Wilson | Date: | Tue, 05 Feb 2002 00:00:53 +0000 |
| Subject: | Re: breaking out of two loops | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83495@lists.php.net to get a copy of this message | ||
On Mon, 2002-02-04 at 15:54, Erik Price wrote:
> Short and sweet:
>
> If I have an "if" statement inside a "switch" statement, how can I
> "break" out of both blocks that I am in? Will one "break" end
> everything? Or should I use one for each level deep that I am?
>
>
> Erik
From the manual:
break accepts an optional numeric argument which tells it how
many nested enclosing structures are to be broken out of
You can find this at http://www.php.net/break (which will
take you
to http://www.php.net/manual/en/control-structures.break.php).
Hope this helps,
Torben
> ----
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> pricee@hhbrown.com
--
Torben Wilson <torben@php.net>
http://www.thebuttlesschaps.com
http://www.hybrid17.com
http://www.inflatableeye.com
+1.604.709.0506