Foreach loop in PHP
The foreach loop traverses each element of the array once. This loop is used only with array.
foreach($array as $variable)
$student = ["Narendra","Prakash","Lakshmi"];
foreach($student as $row)
Output for the above code : Narendra Prakash Lakshmi