UPDATE: Ok, thanks everyone. But, when I replace var with $ i now get these errors:
$ i
array_multisort()[function.array-multiso
yup, you need $mostPoints, not var mostPoints