Advertisements
Advertisements
प्रश्न
Explain the use of for each loop in PHP.
टिप्पणी लिखिए
Advertisements
उत्तर
- The foreach loop works only on arrays,
- It is used to loop through each key/value pair in an array.
shaalaa.com
Looping Structure
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
APPEARS IN
संबंधित प्रश्न
The loop exclusively used for arrays is _____.
Loops that iterate for fixed number of times is called ______.
What will be the output of the following PHP code?
<?php
for ($x = -1; $x < 10;--$x)
{
print $x;
}
?>Define Looping Structure in PHP.
Define for loop in PHP.
Write Syntax of For each loop in PHP.
Write Syntax of Do while loop in PHP.
Differentiate For each and While loop.
Write short notes on Do while Loop.
Discuss in detail about Foreach loop.
