Itirating foreach loop inside ?
Posted: Thu Jul 10, 2003 10:53 am
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.
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.