FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » a perl guy question; next label? continue label?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: a perl guy question; next label? continue label? [message #176259 is a reply to message #176258] Mon, 12 December 2011 21:33 Go to previous messageGo to previous message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma:
Senior Member
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.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Blogs
Next Topic: Joyhong Software wishes you a good day!
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 12:28:55 GMT 2024

Total time taken to generate the page: 0.04579 seconds