why is array_unique not working after array_unshift?
<p>Or maybe I'm doing something else wrong.</p>

<pre><code>&lt;?php
$date = "2011-12-31|12-31";

$fileData = file('something.txt'); // Get file contents as array
print_r($fileData);
echo "&lt;br /&gt;&lt;br /&gt;";

array_unshift($fileData, $date); // Add date to [0]
print_r($fileData);
echo "&lt;br /&gt;&lt;br /&gt;";

$cleanData = array_unique($fileData); // remove dupes
print_r($cleanData);
echo "&lt;br /&gt;&lt;br /&gt;";
?&gt;
</code></pre>

<p>Prints out as:</p>

<pre><code>Array ( [0] =&gt; 2011-12-31|12-31 [1] =&gt; 2011-12-30|12-30 [2] =&gt; 2011-12-29|12-29 ) 

Array ( [0] =&gt; 2011-12-31|12-31 [1] =&gt; 2011-12-31|12-31 [2] =&gt; 2011-12-30|12-30 [3] =&gt; 2011-12-29|12-29 ) 

Array ( [0] =&gt; 2011-12-31|12-31 [1] =&gt; 2011-12-31|12-31 [2] =&gt; 2011-12-30|12-30 [3] =&gt; 2011-12-29|12-29 ) 
</code></pre>

<p>Here is something.txt:</p>

<pre><code>2011-12-31|12-31
2011-12-30|12-30
2011-12-29|12-29
</code></pre>

<p>I suspect that there might be eol or lf markers in the <code>$fileData</code>. If this is the case, is there an easy way to remove them?</p>
