Do is a multi-conditional judgment of the small thing, in order to structure clear, easy to expand, want to use if else, each other with Goto jump into the next condition, each piece of code has been tested normal, such as the following directly in the braces to the inside of a to execute always have problems, seek advice
if () {do something;} Else{goto A;} a:{$x =1; $y = 2; Calculation statement:}
See the demo example using {}, at most only executed one sentence, I want to execute multiple sentences, including assignment and calculation
Is the curly brace only a calculation, not an assignment?
Hello, the goto operator can be used to jump to a specified location in the program. The target location can be tagged with the target name plus a colon. The Goto in PHP has a certain limit and can only jump in the same file and scope, meaning you can't jump out of a function or class method, or jump into another function. You can't jump into any loop or switch structure either. A common use is to jump out of a loop or switch, instead of a multi-layered break.
Example #1 Goto Example
<?phpgoto A;echo ' Foo '; A:echo ' Bar ';? >