Ec (2); the number of times specified in the Code block that phpwhileloopnext executes cyclically, or the specified condition is true. ------------------------------------------------------------------------------ PHP has many loops. When you write code, you want the same code block to run for more than 10 years. Instead of being added to the script, we can use loops to execute the script ec (2); script
Php while loop next
The number of times specified in the Code block that is executed cyclically, or the specified condition is true.
--------------------------------------------------------------------------------
PHP Loop
Most of the time, when you write code, you want the same code block to run for more than 10 years. Instead of being added to the script, we can use loops to execute such tasks with almost the same number of threads.
In PHP, we have the following loop statements:
At the same time, through a code block-loop, the specified condition is true
No... and-traverse a code block once, and repeat the condition specified by the long loop as true
-The number of times that the loop passes through a code block
Foreach source-loop an array through a code block for each element
--------------------------------------------------------------------------------
While Loop
While loop executes the code block, and the condition is correct.
Syntax
While (Condition)
{
Code to be executed;
}
For example
The following example defines a loop starting with I = 1. The loop will continue to run because I only need to be less than or equal to 5. I will add 1 to run each loop:
Html>
$ I = 1;
While ($ I <= 5)
{
Echo "The number is". $ I ."
";
$ I ++;
}
?>
The number is 1
The number is 2
The number is 3
The number is 4
The number is 5