In this tutorial you will learn about the PHP Foreach Loop and its application with practical example.
The foreach Loop
The foreach statement is used to iterate over all elements of an array. It executes same piece of code for every element of an array
1 2 3 4 |
foreach ($array as $value) { //Block of code to be executed comes here; } |