PHP Basic Knowledge Point Summary (ii)

Source: Internet
Author: User

Second, PHP Process Control structure

Branching structure:

Single conditional branching structure bidirectional conditional branching structure multi-directional conditional branching structure nested conditional branching structure
if (expression) {if (expression) {if (expression) {if (expression) {
... if (an expression) {
}}else{elseif (expression) {...

...          ...           }

}} elseif (expression) {

----------------if (expression) {

switch (expression) {...
}else{
Case value 1: ...

...             }

Break }

Case Value 2:
...
Break
Case Value 3:
...
Break
Default
...
}





Loop structure:

While statement: Do...while statement: For statement:
while (expression) {do{for (initialization; conditional expression; increment) {
...          ...            ...
}}while (expression); }

Special Process Control Statements:

Break: Interrupts the current loop, which is the execution of the end loop
Continue: can only be used inside the loop, the function is to skip the cycle, perform the Next loop
Exit: Exit the current script directly, regardless of the structure

PHP Basic Knowledge Point Summary (ii)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.