UPDATE: Ok, thanks everyone. But, when I replace var with $ i now get these errors:
$ i
array_multisort()[function.array-multiso
var mostPoints = max($points);
Have you been using JavaScript a lot lately (or old PHP 4 OO)?
PHP's only use of the var keyword was for old PHP4 style object property definitons.
var
Drop the var part.
Also, don't forget the PHP variable sigil $.
$