Advertisements
Advertisements
Question
Write Syntax of For each loop in PHP.
Short/Brief Note
Advertisements
Solution
for each ($array as $value)
{
code to be executed;
}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 ______.
What will be the output of the following PHP code?
<?php
for ($x = 1; $x < 10;++$x)
{
print “*\t”;
}
?>Define for loop in PHP.
List out Looping Structure in PHP.
Write Syntax of For loop in PHP.
Compare for loop and for each loop.
Write the purpose of Looping Structure in PHP.
Differentiate While and Do while loops.
Explain Looping Structure in PHP.
