title: Out of memory error when reading a large file
body: <p>I have a large csv that I want to parse and insert into my database. I have this PHP:</p>
  
  <pre><code>$target = '../uploads/'.$f;
  $handle = fopen($target, "r");
  $data = fgetcsv($handle, 0, ",");
  
  $rows = array();
  
  while ($data !== FALSE) {
      $rows[] =  $data;
  }
  
  fclose($handle);
  
  if (count($rows)) {
               foreach ($rows as $key =&gt; $value) {
  
                    echo $value;
  
                }
            }
  </code></pre>
  
  <p>Every time I try to run my script I get this error:</p>
  
  <pre><code>Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 35 bytes)
  </code></pre>
  
  <p>Any ideas how to do this?</p>