Advertisements
Advertisements
Question
Explain the use of for each loop in PHP.
Short/Brief Note
Advertisements
Solution
- The foreach loop works only on arrays,
- It is used to loop through each key/value pair in an array.
shaalaa.com
Looping Structure
Is there an error in this question or solution?
APPEARS IN
RELATED QUESTIONS
The loop exclusively used for arrays is _____.
PHP supports which types of looping techniques ______.
Define Looping Structure in PHP.
Write Syntax of For loop in PHP.
Write Syntax of For each loop in PHP.
Write the purpose of Looping Structure in PHP.
Differentiate While and Do while loops.
Explain the process Do while loop.
Explain concepts of for loop with example.
Explain working of loops in array.
