If you are in a 3rd nested loop in PHP, you can do break 3;
and break all loops up 3 levels.
break
seems to work in C. But if I do break 3
I get a syntax error. I guess it doesn't support it.
What is the best way to break multiple loops? Should I set a flag which is checked up the loops - and breaks if it is set?
Is there anything more elegant?