The 99 multiplication table for PHP printing mathematics uses two for loops, and for loops is one of the more commonly used in PHP process Control statements, and the structure of the flow control statements is broadly divided into three types: sequential structure, branching structure and cyclic structure. Cyclic structures are most commonly used with while loops, do......while loops, and for loops, which have their own characteristics. where the while is suitable for the conditional loop, for the number of cycles , the 99 multiplication table best reflects the characteristics of the FOR Loop statement:
In addition, go to is not available in pure object-oriented Java, and the Go To,goto operator in the C language and PHP 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.
<?php
Goto A;
Echo ' Foo ';
A:
Echo ' Bar ';
?>
The features of Go to support others, and others object to the inclusion of Goto in PHP for the following reasons:
Supporters: Code jump fast, convenient
Opponents: the large use of goto statements is a disaster, especially in the subsequent maintenance of the code, the GOTO statement makes the program structure chaotic (although it can execute correctly), but it is difficult to read. Because goto statements can jump flexibly, if not limited, it does break the structural design style. Second, a goto statement often brings errors or pitfalls, and it may skip the construction of certain objects (destroying object-oriented principles), initialization of variables, important calculations, and so on. But to be realistic, this kind of mistake is caused by the programmer himself, not Goto's fault
PHP Base Loop statement printing 99 multiplication table