PHP Foreach Loop
A total different kind of loop is the foreach loop. This loop is used to separately handle each sub-variable out of an array. Each sub-variable may be split into its name and its value. foreach($array AS $key => $value) { … execute code … } Each sub-variable of the array $array will be split into [...]