title: CSV upload to MySQL leaving carriage return
body: <p>I've managed to get my upload CSV to MySQL working.</p>
  
  <p>But I'm facing a problem where when it uploads the list after every entry it adds a return at the end:</p>
  
  <pre><code>$file = $_FILES[csv][tmp_name];
  
  $handle = @fopen($file,"r");
  if ($handle) {
      while (($buffer = fgets($handle, 125000)) !== false) {
          $import="INSERT into test_mysql (uid, number) values (UUID(), '$buffer')";
          mysql_query($import) or die(mysql_error());
      }
  }
  </code></pre>