Quote:
Originally Posted by Skyld
It's called "return", and will end function execution there and then, regardless of how many loops you have.
|
Example:
PHP Code:
function onCreated() {
foo = bar;
var = 2;
doLoop();
doOtherThings();
}
function doLoop() {
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
if (this.stuff[i][j])
doLoopThings();
return;
}
}
}
}