Contact US

Get Your Project Done by our experts

Foreach loop in PHP

foreach loop

The foreach loop traverses each element of the array once. This loop is used only with array.

Syntax : 

foreach($array as $variable)



$student = ["Narendra","Prakash","Lakshmi"];

foreach($student as $row)
    echo $row."\t";


Output for the above code : Narendra Prakash Lakshmi

© Copyright - 2018 - 2021 | All rights reserved at Funda of Web IT