PHP extra space after array_merge()
===

I'm trying to merge array elements imported from a multi-line text file, separated by commas:

    $ cat input.txt 
    one,two,three,four
    red,blue,green
    human,klingon,dolphin

What I want to get is a single array with 10 items in it.  The code I've tried is this:


    <?php
    
    $fa=file("input.txt");
    $w=array();
    foreach($fa as $combo) {
        $w=array_merge($w,explode(",",$combo));
    }
    print_r($w);

    ?>

The problem is, I seem to be getting returns after line endings:


    Array
    (
        [0] => one
        [1] => two
        [2] => three
        [3] => four
    
        [4] => red
        [5] => blue
        [6] => green
    
        [7] => human
        [8] => klingon
        [9] => dolphin
    
    )

Why are the spaces there?  How do I get rid of them?
