I came across this situation ((extracted from php docs))
Using the continue statement in a file included in the loop will result in an error. For instance:
// main.php for($x=0;$x<10;$x++) { include('recycled.php'); } // recycled.php if($x==5) continue; else print $x;
it should print "012346789" not five, but causes an error:
Cannot break/continue 1 level in etc.
there is a solution for this, I mean, I need to "process" recycled.php in such a way when using the continue operator does not cause this error, remember that this is a simple clear code example, in the real case I need to find a way to continue the loop file main.php. .
source share