PHP Foreach Loop

tutorial and example
tutorial and example

PHP foreach loop is used to display the value of an array. It works with arrays to traversal the data.

Synatx:

Example

Output

John
Rohan
Shyam
Seeta