php jump statements include: 1. The break statement can not only jump out of the current loop, but also specify how many loops to jump out of, with a format such as [break n;]; 2. After executing the continue statement, the program will end execution of this cycle and start the execution of the next cycle.
【Related learning recommendations: php graphic tutorial】
PHP programming language has two jump statements, namely break and continue
1.break
Jump statement
The break keyword can terminate The current loop includes all control statements including while, do...while, for, foreach and switch.
The break statement can not only jump out of the current loop, but also specify how many loops to jump out of. The format is as follows:
break n;
2.contunue
Jump statement
After the program executes break, it will jump out of the loop and start executing the remainder of the loop body The statement .continue jump statement is not as powerful as break. It can only terminate the current cycle and enter the next cycle. After executing the continue statement, the program will end the execution of the current cycle and start the next cycle. The execution operation of the loop. continue can also specify how many loops to jump out of.
The break and continue statements both implement jump functions, but there is still a difference: the continue statement only ends the current loop, not the entire The execution of the loop, and the break statement is the entire loop process.
Related learning recommendations:php programming(video)
The above is the detailed content of What are the php jump statements?. For more information, please follow other related articles on the PHP Chinese website!