Skip first line of fgetcsv method

Before beginning the while loop, just get the first line and do nothing with it. This way the logic to test if it’s the first line is not needed.

fgetcsv($file, 10000, ",");
while (($emapData = fgetcsv($file, 10000, ",")) !== FALSE) {
  //....
}

Leave a Comment