Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   PHP / mySQL (http://siteownersforums.com/forumdisplay.php?f=10)
-   -   what types of loops exist in php ? (http://siteownersforums.com/showthread.php?t=202762)

eventplanner779 09-24-2017 10:10 PM

what types of loops exist in php ?
 
what types of loops exist in php ?

travelowebseo 09-26-2017 05:22 AM

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.

thevyakar 11-03-2017 12:14 AM

for
while
do..while
foreach

Shalini001 11-09-2017 12:18 AM

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.

Lebar.123 11-23-2017 07:37 AM

All that exist in all other languages:

For While Do While ForEach.

seven miles 11-23-2017 09:47 PM

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.

for each − loops through a block of code for each element in an array

BryceBrady 12-22-2017 04:28 AM

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.

nele 12-26-2017 03:57 PM

Loops in PHP are used to execute the same block of code a specified number of times. 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.

yuvashri 12-28-2017 04:12 AM

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.

aesthetiqclinic 01-05-2018 03:04 AM

php support four type of loops
1. for loop: mostly used to repeat a code for specified number of times.
2. while loop: use to repeat a code until the test condition remains true.
3. do-while loop: at least one time execution of code. after that code execution depends upon condition.
4: foreach: execute a block of code for each element of array

exproacademy 01-18-2018 03:44 AM

Types of loops in PHP
 
1. for
2. while
3. do...while
4. foreach

marvinsam 01-18-2018 04:24 AM

There are 3 types of loops are there in php.

1. For
2. While
3. Do while

aesthetiqclinic 02-18-2018 09:42 PM

There are 4 types of loops in PHP and that are For Loop, While Loop, Do While Loop and foreach Loop. they are used to loop all the data or any record to do different tasks.

smmexpertss 02-25-2018 02:21 AM

oops in PHP are used to execute the same block of code a specified number of times. 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.


All times are GMT -7. The time now is 08:38 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.