Rather simple code...
foreach ($a as $e){
if(...){
do something, and don't process the rest of this foreach segment, just iterate to next one
}
if(...){
do something, and don't process the rest of this foreach segment, just iterate to next one
}
}
I tried break but it gets out of the whole statement ( foreach )
Example is simplified, there are multiple ifs indiside of foreach and it would really simplify things if i could "break" out of current iteration and have next one start right away, for clarity as well as processing time reasons.
Any ideas ? Thank you very much.
Itirating foreach loop inside ?
Moderator: General Moderators
Hi,
Just as in C, does exactly what you want
Just as in C,
Code: Select all
continue