Forum Moderators: coopster
If that doesn't apply, have an intermediate variable V.
Lets say your values are stored in an array val[], and there are 'max' of them stored.
Let i be a simple index counter.
for (i=0; i=max; i++)
{ V = val[i];
if V==8 V=0;
SUM = SUM+V;
}
I might have assignment and equality operators mixed up, but hopefully you get the idea. -Larry
Slightly more complicated: What if I want to exclude a whole line if I think that there are too many null values?
For example, someone has entered 1,3,2,5 and then there are several missing values.
I think that more than four '8's (missing) should void the whole line.
Is that possible to specify with PHP?