Page 1 of 1

Foreach - continue loop some levels up

Posted: Fri Jan 30, 2009 7:42 pm
by weebee
How to contiune the foreach loop when I am in the middle of a "if" in a "if" in a "foreach"?

Code: Select all

 
foreach($array_content_each_line as $each_line){
 
    if(// SOMETHING //){
        if(//SOMETHING){
--->    // IF THIS IS TRUE, I WANT TO CONTINUE ON THE NEXT FIELD IN THE $array_content_each_line
        }
        else {
        }
    }
 
    if(// OTHER STUFF){
        // NOTHING SPECIAL HERE
    }
    else {
        if( // STUFF){
        }
        if ( // STUFF){         
        }
        // MORE CODE HERE
    }
}
 

Re: Foreach - continue loop some levels up

Posted: Fri Jan 30, 2009 7:51 pm
by Benjamin

Code: Select all

 
continue;
 

Re: Foreach - continue loop some levels up

Posted: Sat Jan 31, 2009 3:15 am
by weebee
Great! Thank you! :D