reset ending empty lines to one line only

while this produces empty array line with print_r

AND WHY the hell is competition named "Coffee Cup" ? :)