I have a CSV file and I read data from CSV file then I want to skip first line of CSV file.Which\'ll contain any header. I am using this code.
while (($emapDa
A bit late, but here is another way to do so (without having to count all the lines): with fgets
$file = fopen($filename, 'r'); // create handler
fgets($file); // read one line for nothing (skip header)
while (($line = fgetcsv($file, 10000, ",")) !== FALSE) {
// do your thing
}
One might consider this to be more elegant