php merge arrays
<p>I have been trying (unsuccessfully) to merge the output of multiple arrays into a single array. An example of what I tried was:</p>

<pre><code>$data1 = array("cat", "goat");
$data2 = array("dog", "cow");
print_r(array_merge($data1, $data2));
</code></pre>

<p>That worked fine, but with the code I am using below, how may I achieve the desired output I am looking for?</p>

<pre><code>$filename = "item.txt";
$lines = array();
$file = fopen($filename, "r");

while(!feof($file)) {
    $lines[] = explode("\t", fgets($file));
}   
fclose ($file);

foreach ($lines as $inner){
    $item = array($inner[1]);

    echo "&lt;pre&gt;";
    print_r($item);
    echo "&lt;/pre&gt;";
}
</code></pre>

<p>My current output is:</p>

<pre><code>Array
(
    [0] =&gt; Item one
)

Array
(
    [0] =&gt; Item two
)

Array
(
    [0] =&gt; Item three
)

Array
(
    [0] =&gt; Item four
)
</code></pre>

<p>Desired output would be:</p>

<pre><code>Array
(
    [0] =&gt; Item one
    [1] =&gt; Item two
    [2] =&gt; Item three
    [3] =&gt; Item four
)
</code></pre>

<p>Thank you for any suggestions in advanced.</p>
