0
This is dumb but can someone explain why this outputs 10. Im confused
2 Antworten
+ 7
left is a and right is i:
0+0=0;
0+1=1;
1+2=3;
3+3=6;
6+4=10;
+ 1
$a is summation of numbers 0 to 4
it's like this code
$a = 0
$a = $a + 0
$a = $a + 1
$a = $a + 2
$a = $a + 3
$a = $a + 4
echo $a