Yo! I have a really tough problem here that I would like to have solved!
I have three variables in an array:
$num[1] = 0;
$num[2] = 0;
$num[3] = 0;
And three more variables.
$num[1]["add"] = 10;
$num[2]["add"] = 5;
$num[3]["add"] = 2;
the formula I want to use is like this:
$num[$i] = $num[$i] + num[$i]["add"];
And here is the problem: I want to make some sort of loop (probably within another loop) that will check which of the variables ($num[1], $num[2] and $num[3]) was first to reach 100.
IMPORTANT NOTICE: Sometimes I would like more than three variables to change! So the loop must use the expression $num[$i];
Could someone help me with this???