Break Statement
By S.Tanveer
Published: 14 Aug 2006
Break Statement In PHP
Break Statement
The break statement in PHP immediately terminated the loop without waiting to get back to test condition.
For example:
" ; } ?>
We see that in this code we use for loop to display the number 1 to 100 . but using break statement before the print statement stopped the loop when counter reached to 50 and loop is terminated.