[RESOLVED] If then else Score
I have some messy code and need to add another feature, but need some help doing so...
Key:
<tab> = I can't type a tab, so I shall put one of these
File contents:
[user_answer.csv]
0,68,285
0,68,286
0,68,287
0,69,290
[question.csv]
... (im not going to type out 100's of lines)
68<tab>0<tab>Question 285
69<tab>0<tab>Question 286
[answer.csv]
...(im not going to type out 110's of lines)
285<tab>0<tab>Answer 285<tab>25
286<tab>0<tab>Answer 286<tab>25
287<tab>0<tab>Answer 187<tab>0
...
290<tab>0<tab>Answer 190<tab>100
What my code created a html file which displays (when viewed in IE):
Question 68
285 - Answer 285
286 - Answer 286
287 - Answer 287
Question 69
290 - Answer 290
Now take note at the last part of answer.csv, the numbers. What I want:
If the the total of the last set of numbers doesn't add up to 100, then I want the answers displayed, but if they do add up to 100, then they are to be ignored.
A better example is this:
If you notice Question 68 adds up to 50, and Question 69 adds up to 100. So only the following should be created:
Question 68
285 - Answer 285
286 - Answer 286
287 - Answer 287
Question 69 ignored as it reaches 100 in total.
I'm now going to have to post my code in my next post under this, as I've used up all my space explaining this in here, lol.
Bear with me while I add it....
Cheers :)