what types of loops exist in php?

PHP supports following four loop types:
for - loops through a block of code a specified number of times.
while - loops through a block of code if and as long as a specified condition is true.
do...while - loops through a block of code once, and then repeats the loop as long as a special condition is true.
foreach - loops through a block of code for each element in an array.
 
I fond this from google.


for - loops through a block of code a specified number of times.
while - loops through a block of code if and as long as a specified condition is true.
do...while - loops through a block of code once, and then repeats the loop as long as a special condition is true.
foreach - loops through a block of code for each element in an array.
 
for - loops through a block of code a specified number of times.
while - loops through a block of code if and as long as a specified condition is true.
do...while - loops through a block of code once, and then repeats the loop as long as a special condition is true.
foreach - loops through a block of code for each element in an array.
 
Loops in PHP are utilized to execute the same square of code a predefined number of times. PHP backings taking after four circle sorts.

for - circles through a square of code a predefined number of times.

while - circles through a square of code if and the length of a predetermined condition is valid.

do...while - circles through a piece of code once, and afterward rehashes the circle the length of an exceptional condition is valid.

foreach - circles through a piece of code for every component in a cluster.
 
Back
Top