Jump to content

[SOLVED] fopen and read file from 3rd line


mycow

Recommended Posts

Hello

I have the following code and i am trying to find a way to read the file from the 3rd line and not from the first. Is this possible?

 

$handle = fopen("file.csv", 'r');
while(($data = fgetcsv($handle, 100000, ";")) !== false)
{
list($col1, $col2, $col3, $col4) = $data;
}
fclose($handle);

 

Thank you for any help

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.