Controlling a loop
Posted: Thu Aug 14, 2003 2:01 pm
Hello,
I'm trying to loop through an array using foreach().
When I come to a particular value, I want to skip it and go back to looping with my foreach() on the next value after the one I skipped.
Also, when I get to another particular value I'll want to bail out of the foreach all together.
I know how to do this in Perl, (next, last) but I'm not sure how to do it in PHP.
Thanks,
- D
I'm trying to loop through an array using foreach().
When I come to a particular value, I want to skip it and go back to looping with my foreach() on the next value after the one I skipped.
Also, when I get to another particular value I'll want to bail out of the foreach all together.
I know how to do this in Perl, (next, last) but I'm not sure how to do it in PHP.
Thanks,
- D