• Teach Your Self With
             w3htmlschool.com

PHP Foreach loop

foreach loop only works on arrays and objects. and will display error when we try to use it on variable with different data type.
Example
Example Output

Syntax


foreach (array_expression as $value)
statement