Append to array, then implode; avoid string manipulation.