Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #4057
| From | "Peter H. Coffin" <hellsop@ninehells.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: a perl guy question; next label? continue label? |
| Date | 2011-12-12 15:33 -0600 |
| Organization | A noiseless patient Spider |
| Message-ID | <slrnjecsoc.51n.hellsop@nibelheim.ninehells.com> (permalink) |
| References | <daf31c1e-2cbb-4141-a2a6-b85806c14005@q9g2000yqe.googlegroups.com> |
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.
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
a perl guy question; next label? continue label? oldyork90 <oldyork90@yahoo.com> - 2011-12-12 12:41 -0800
Re: a perl guy question; next label? continue label? "Peter H. Coffin" <hellsop@ninehells.com> - 2011-12-12 15:33 -0600
Re: a perl guy question; next label? continue label? oldyork90 <oldyork90@yahoo.com> - 2011-12-12 17:38 -0800
Re: a perl guy question; next label? continue label? "Peter H. Coffin" <hellsop@ninehells.com> - 2011-12-13 07:26 -0600
Re: a perl guy question; next label? continue label? Tim Streater <timstreater@greenbee.net> - 2011-12-13 14:57 +0000
Re: a perl guy question; next label? continue label? The Natural Philosopher <tnp@invalid.invalid> - 2011-12-13 19:44 +0000
Re: a perl guy question; next label? continue label? Erwin Moller <Since_humans_read_this_I_am_spammed_too_much@spamyourself.com> - 2011-12-14 14:02 +0100
csiph-web