php rtrim added to list of teams so that the right trailing comma is taken out