title: Reading csv files into array and skipping the first row PHP
body: <p>I have a CSV file and the first two columns are headers </p>
  
  <pre><code>'Student','ID','SIS User ID' 
  Points Possible      
  Ashe,   797389, 11721809
  Darius,  20237, 55050811
  Fizz,    34604, 55035088
  Tom Kenn,20232, 55050802
  Vayne,  797413, 11813445
  </code></pre>
  
  <p>For the first two columns, they should not be added to the array.
  Start from Ashe, I would like to add <code>Ashe, 797389, 11721809</code> row to <code>array[0]</code>
  Darius to <code>array[1]</code>,....</p>
  
  <p>I write my code as follows:</p>
  
  <pre><code>&lt;?php
  $csvData = file_get_contents('output.csv');
  $lines = explode(PHP_EOL, $csvData);
  $array = array();
  foreach ($lines as $line) {
      $array[] = str_getcsv($line);
  }
  print_r($array[2][5]);
  ?&gt; 
  </code></pre>
  
  <p>What should I do in order to skip the first two rows?</p>
  
  <p>After fixing the problems, there is a empty array . How to eliminate the empty array ?</p>
  
  <pre><code>[797413] =&gt; Array
      (
          [0] =&gt; Vayne
          [1] =&gt; 797413
          [2] =&gt; 11813445
          [3] =&gt; lsmdec
          [4] =&gt; cs3487
          [5] =&gt; 12.15
          [6] =&gt; 15
          [7] =&gt; 5
          [8] =&gt; 17
          [9] =&gt; 49.15
          [10] =&gt; 49.15
          [11] =&gt; 49.15
          [12] =&gt; 49.15
          [13] =&gt; 49.15
          [14] =&gt; 49.15
          [15] =&gt; 49.15
          [16] =&gt; 49.15
          [17] =&gt; C-
          [18] =&gt; C-
      )
  
  [] =&gt; Array
      (
          [0] =&gt; 
      )
  </code></pre>