Register on the forum now to remove ALL ads + popups + get access to tons of hidden content for members only!

Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > PHP / mySQL

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 09-24-2017, 10:10 PM   #1
eventplanner779
Registered User
 
Join Date: Sep 2017
Location: Delhi
Posts: 42
what types of loops exist in php ?

what types of loops exist in php ?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
eventplanner779 is offline   Reply With Quote

Old 09-26-2017, 05:22 AM   #2
travelowebseo
Registered User
 
Join Date: Sep 2017
Posts: 201
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.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
travelowebseo is offline   Reply With Quote
Old 10-20-2017, 03:27 AM   #3
sadianisar
Registered User
 
Join Date: Jul 2016
Posts: 3,808
There are 4 types of loops which PHP supports such as for - loops, foreach- loops, do...while - loops and while - loops.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
sadianisar is offline   Reply With Quote
Old 11-03-2017, 12:14 AM   #4
thevyakar
Registered User
 
Join Date: Nov 2017
Location: USA
Posts: 113
for
while
do..while
foreach
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
thevyakar is offline   Reply With Quote
Old 11-08-2017, 11:18 PM   #5
Shalini001
Registered User
 
Join Date: Oct 2017
Posts: 51
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.
Shalini001 is offline   Reply With Quote
Old 11-17-2017, 02:07 PM   #6
Faraone
Registered User
 
Join Date: Feb 2017
Location: Egypt
Posts: 4,105
There are four loops in php:
For
Foreach
Do... While
And while
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

---
Join our
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
, Invite people and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
. Share your thoughts, moments and interesting.
Faraone is offline   Reply With Quote
Old 11-23-2017, 06:37 AM   #7
Lebar.123
Registered User
 
Join Date: Nov 2017
Posts: 539
All that exist in all other languages:

For While Do While ForEach.
__________________
Get your email validated by our
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
@ ZeroBounce
Lebar.123 is offline   Reply With Quote
Old 11-23-2017, 08:47 PM   #8
seven miles
Registered User
 
Join Date: Nov 2017
Posts: 137
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
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
seven miles is offline   Reply With Quote
Old 12-22-2017, 03:28 AM   #9
BryceBrady
Registered User
 
Join Date: Oct 2016
Posts: 775
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.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
BryceBrady is offline   Reply With Quote
Old 12-26-2017, 02:57 PM   #10
nele
Registered User
 
Join Date: Aug 2013
Posts: 91
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.
__________________
"Powerfull state of the art DELL servers!"

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
- Ultimate Windows VPS hosting | Dedicated hardware MS Hyper-V technology Premium bandwidth providers

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
- Chat support Full 24/7 help desk support Email support
nele is offline   Reply With Quote
Old 12-28-2017, 03:12 AM   #11
yuvashri
Registered User
 
Join Date: Jun 2017
Posts: 471
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.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
yuvashri is offline   Reply With Quote
Old 01-05-2018, 02:04 AM   #12
aesthetiqclinic
Registered User
 
Join Date: Jan 2018
Posts: 97
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
aesthetiqclinic is offline   Reply With Quote
Old 01-18-2018, 02:44 AM   #13
exproacademy
Registered User
 
Join Date: Oct 2017
Posts: 16
Types of loops in PHP

1. for
2. while
3. do...while
4. foreach
exproacademy is offline   Reply With Quote
Old 01-18-2018, 03:24 AM   #14
marvinsam
Registered User
 
Join Date: Apr 2016
Posts: 589
There are 3 types of loops are there in php.

1. For
2. While
3. Do while
marvinsam is offline   Reply With Quote
Old 02-18-2018, 08:42 PM   #15
aesthetiqclinic
Registered User
 
Join Date: Jan 2018
Posts: 97
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.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
aesthetiqclinic is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP project training in ahmedabad, live project training in php ahmedabad anantitsolution Post your ad here 8 09-21-2018 11:59 PM
Importance of Php Development for Web Development tech.biztech Programming General 52 08-01-2018 01:18 PM
How many types of joining in php mark1 PHP / mySQL 10 02-17-2017 06:00 AM
What are Loops in Java? What are three types of loops? Shivangi Panwar Java 7 06-20-2016 04:02 AM
Explain the different types of errors in PHP. Broach India Programming General 7 04-10-2015 02:46 AM


All times are GMT -7. The time now is 01:16 PM.


Powered by vBulletin Copyright © 2013 vBulletin Solutions, Inc.