[ticket/7707] Add comma to last entry of arrays

PHPBB3-7707