PHP TutorialsPhp What is
PHP INI TutorialsPhp ini What is
break statement is used to control the program execution for for, foreach, while, do - while loops and switch case.
In the above example We use an if statement to test the value of $counter. If it is equal to zero, the break statement immediately halts execution of the code block, and program flow continues after the for statement.
You can omit any of the expressions from a for statement, but you must remember to retain the semicolons.