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 #176261 is a reply to message #176259] Tue, 13 December 2011 01:38 Go to previous messageGo to previous message
oldyork90 is currently offline  oldyork90
Messages: 9
Registered: December 2011
Karma:
Junior Member
On Dec 12, 3:33 pm, "Peter H. Coffin" <hell...@ninehells.com> wrote:
> 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.

Yah, I saw that. I wondering about the label part of it. (array ==
@ .. what is this strange language :-)
[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: Sat Nov 23 05:06:49 GMT 2024

Total time taken to generate the page: 0.04479 seconds