Example of using php loop statement to control break and continue
This article describes how to use php to jump out of the loop break and skip a certain layer of loop continue. For more information, see.This article will show you how to use
This article describes the use of PHP to jump out of the loop break, and skip a layer of cyclic continue specific usage, with the need for a friend reference.This article leads you to understand the use of break and continue, and their role in
The loop structure in PHP has roughly a for loop, while loop, do{} while loop and several foreach loops, regardless of the loop, in
There are several ways to jump out of a loop in PHP:Code:
Copy CodeThe code is as follows:
$i = 1;
while (true)
You can use the for statement to control multiple variables to implement advanced applications with multiple loops.The following shows a program that uses the for statement to output a 9*9 multiplication table: The code is as follows:Copy code
PHP Loop-While Loop
Loop executes the number of times specified by the code block, or the loop executes the code block when the specified condition is true.
PHP LoopsWhen you write code, you often need to have the same code block run
Usage of PHP function continue in the loop structure. The difference between the actual PHP function continue is that we accept an optional numeric parameter to decide to skip several repeated loops to the end of the loop. In php, continue is used
In our program development, it may be necessary to repeat the use of a piece of code or a function, such as the need to enter "1*2*3*4...*100", if the human input, it will waste a lot of time, but also very cumbersome, but in this case, there is a
Learning notes for forwhile loop statements in php. This article introduces how to use basic loop statements in php, including for loop, while loop, and dowhile loop. This article is suitable for beginners of php. This article introduces how to use
We are in the actualPHP function Continue is unique in that it takes an optional numeric parameter to decide to skip a few loops to the end of the loop.
In PHP, continue is used in the loop structure to skip the remaining code in the loop and start
a more comprehensive set of PHP tutorials , basic video and some small combat projects, below is the video directoryCD-ROM (i) \php employment Class (I.)CD-ROM (i) \php Technical exchange zone. URLCD-ROM (i) \ "Wisdom Special issue" belongs to it
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.