This loop is used to iterate over arrays. For every counter of loop, an array element is assigned and the next counter is shifted to the next element.
Syntax:
foreach (array_element as value) {
//code to be executed
}
#PHPTutorial #PHPForBeginners #AtifNaseem