$team[$j][13] += 2;
In this example $team[$j] can for example be tottenham, so in other words we are trying to say $tottenham[13]
This doesn't work, and I don't know how to solve the problem.
Lars Olav.
What you are looking for are called "variable variables". Basically, you would enclose it as so:
${$team[$j]}[13] += 2;
The squigley braces tell it to evaluate the scring and use that as the variable name. I hope that helps.
Chris King
This doesn't work in my case. When I try to print I only get Array[and the number]. Can it have anything to do with the number 13 is dynamic? I am using numbers from 0 to 20. So the code looks like this: $team[$j][3] += 1 $team[$j][7] += 6 $team[$j][9] += 5 $team[$j][13] += 2
Lars Olav