Tell me about foreach | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Tell me about foreach

21st Dec 2016, 3:00 PM
srimathi.m.c
3 Answers
+ 8
Foreach supports iteration over different kinds of values. It can be array or traversable objects.
21st Dec 2016, 4:15 PM
Remmae
Remmae - avatar
0
u use it for looping it has a start and an end point, for example u can use for each to print a sequence from 1 to 10.
21st Dec 2016, 6:45 PM
Amit Kala
Amit Kala - avatar
0
foreach will loop data in array
22nd Feb 2017, 9:38 AM
Deni Abi Suma
Deni Abi Suma - avatar