title: Import (parse) large CSV file with php
body: <p>I have large CSV file of the data which i need to import using php. CSV contains 50 000 plus rows and 12 columns. Size up to 10MB.</p>
  
  <p>example of the csv:</p>
  
  <pre><code>1;B*2332IF2.8;Hikvision DS-2CD2332-I F2.8 DOME;177.0000;146.2817;177.0000;141.2800;134.2200;0.0000;670.0000;B-BAL,;114.0000
  1;B*2432FIF2.8;Hikvision DS-2CD2432F-I F2.8 CUBE;152.0000;126.0000;152.0000;119.7000;114.0000;0.0000;400.0000;B-BAL,;118.0000
  1;B*2T32I8F12;Hikvision DS-2CD2T32-I8 F12 BULLET;214.0000;176.0000;214.0000;158.0000;142.0000;0.0000;0.0000;B-BAL,;154.0000
  0;B*2T42WDI8F4;Hikvision DS-2CD2T42WD-I8 F4;159.0000;131.4056;0.0000;125.0000;125.0000;0.0000;1300.0000;B-BAL,;134.0000
  1;B*7604NIE1;Hikvision DS-7604NI-E1;128.0000;105.7856;0.0000;0.0000;0.0000;2.0000;1000.0000;B-BAL,;124.0000
  </code></pre>
  
  <p>I try to use fgetcsv() function, but no success. I have increased time and memory but  no success...</p>
  
  <pre><code>if (($h = fopen("my_large.csv", "r")) !== FALSE) 
  {
    // Convert each line into the local $data variable
    while (($data = fgetcsv($h, 1000, ";")) !== FALSE) 
    {     
      // Read the data from a each single line and processing... writing to the database
    }
  
    // Close the file
    fclose($h);
  }
  </code></pre>
  
  <p>Please help to solve the problem.</p>