I don't quite get this, it means that if I have an array, say 3 elements, when I say foreach($elements as $element) every one of this three elements will go one by one to the variable $element? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

I don't quite get this, it means that if I have an array, say 3 elements, when I say foreach($elements as $element) every one of this three elements will go one by one to the variable $element?

10th Mar 2016, 9:02 PM
Eduardo Tito
Eduardo Tito - avatar
3 ответов
+ 3
yes until it takes the last element in ur defined array
2nd Apr 2016, 2:56 AM
Athulya Gauri
Athulya Gauri - avatar
+ 1
yes
21st Apr 2016, 11:08 AM
Ibrahim Otieno
Ibrahim Otieno - avatar
0
yes
3rd Aug 2016, 8:20 AM
Thif N