This is likely very trivial but I haven't been able to figure it out.
This works:
function MyFunction(){
//Do stuff
}
foreach($x as $y){
MyFunction();
if($foo === 'bar'){continue;}
//Do stuff
echo $output . '<br>';
}
But this doesn't:
function MyFunction(){
//Do stuff
if($foo === 'bar'){continue;}
}
foreach($x as $y){
MyFunction();
//Do stuff
echo $output . '<br>';
}
That yields only 1 $output and then:
Fatal error: Cannot break/continue 1 level
Any idea what I'm doing wrong?