+ 2
Hi, Could You explpain me, why $res=6 in the END is the result of the code below?
4 ответов
+ 2
a start with 3
that means for each push
r[0]=3
r[1]=4
r[2]=5
r[3]=6
+ 2
Thank You, Teste. That'sright
+ 2
Thanks You too, Prokopios!!!
+ 1
Loop Iteration
-- ===========
1 : $i = 3 ; $res[0] = 3
2 : $i = 4 ; $res[1] = 4
3 : $i = 5 ; $res[2] = 5
4 : $i = 6 ; $res[3] = 6
5 : $i = 7 ; $res[4] = 7
6 : $i = 8 ; $res[5] = 8
7 : $i = 9 ; $res[6] = 9
As a result, $res[3] = 6