PHP exploding line breaks with uploaded files
<p>Data files that users submit on my site are formatted like this:</p>

<pre><code>Text text text text text
text texttext text text
text text text text 

text text text text text 
text text text text 
text text text 
</code></pre>

<p>While developing my php script to read these files, I would explode() the file after using <code>file_get_contents</code> with the delimiter <code>\n\n</code> which would make an array from the above example.</p>

<p>But now that I am transitioning to a live site, and am developing the form to submit the file, this explode technique no longer works.</p>

<pre><code>foreach ($_FILES['file']['tmp_name'] as $file) {
   $fname = file_get_contents($file);
   $rows = explode("\n\n", $fname);
   //do work
}
</code></pre>

<p>When I <code>echo $row[0]</code> the entire uploaded file is returned, instead of just the first paragraph. $rows[1] is empty. <strong>Why isn't explode working here?</strong></p>
