The functionality of foreach() but with an equivalent of break , is given by any() : to continue the loop you return false, to stop you return true; the result of any() can be ignored.25 Eyl 2012
The functionality of foreach() but with an equivalent of break , is given by any() : to continue the loop you return false, to stop you return true; the result of any() can be ignored.25 Eyl 2012