Fixed wrong variable name from $table to $player