Obviously, you have to do the comparison inside the loop. The way you have it, you get only one result and that is only after the for loop finishes. You can't just say 'only the results are important' when you lack the basic knowledge to get any sort of results at all.
↧