1.

What is For each loop in PHP?

Answer»

For each Loop:

1. for each loop is exclusively available in PHP.

2. It works only with arrays. The loop iteration deepens on each KEY Value pair in the Array.

3. For each, loop iteration the value of the current array element is assigned to $value variable and the array pointer is shifted by one, until it reaches the end of the array element.



Discussion

No Comment Found

Related InterviewSolutions