Five. PHP language Structure (3) Break continue

Source: Internet
Author: User
Break and continue learning goal: the difference between break and continue, pay attention to its printed value. <?        php//break continuefor ($i =1; $i <=10; $i + +) {if ($i ==4) {continue;         } echo $i; Printed: 1235678910 Analysis: This continue only prints to 3, 4 does not print, skips, and then hits the number later. }echo ' <br/> ';    for ($i =1; $i <=10; $i + +) {if ($i ==3) {break;       } echo $i; Printed: 12 Analysis: This break is a breach that includes the current to the back of the number completely not printed. }?>

Five. PHP language Structure (3) Break continue

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.