Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: "Peter H. Coffin" Newsgroups: comp.lang.php Subject: Re: a perl guy question; next label? continue label? Date: Mon, 12 Dec 2011 15:33:00 -0600 Organization: A noiseless patient Spider Lines: 29 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="le/2G4+BNpieVhQI6uJ2Lw"; logging-data="32349"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19lh2tABgrrMgIXH0e90kfj" User-Agent: slrn/0.9.9p1 (OpenBSD) Cancel-Lock: sha1:ulMyhS+B9XJX9Yed8hxkLkwQqSE= Xref: x330-a1.tempe.blueboxinc.net comp.lang.php:4057 On Mon, 12 Dec 2011 12:41:32 -0800 (PST), oldyork90 wrote: > It doesn't appear the php has a continue label construct as in (perl) > >:outer for(....... > :inner for (.... > if (...) { > next outer; > > Is that correct? It does have, sort of. It is, shockingly, called "continue". PHP-wise, the above would be for (...) { for (...) { if (...) { continue 2; } // This part is skipped by the continue 2 (or continue 1, 0 // or continue all by itself). } // This part is ALSO skipped by the continue 2 above, but would // execute if continue 1, 0, or continue alone were used. } -- Whenever you look at a beautiful woman, always remember that somewhere, someone is tired of her.