Jump to content

Archived

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

webent

[SOLVED] Skip first line in csv file import

Recommended Posts

Hi, I was wondering if someone could help me figure out how to skip the first line in my csv import...

 

$handle = fopen($_POST['file_name'], "r");
while (($fields = fgetcsv($handle, 0, ",")) !== FALSE) {

Share this post


Link to post
Share on other sites
$count = 0;
while (($fields = fgetcsv($handle, 0, ",")) !== FALSE) {
    $count++;
    if ($count == 1) { continue; }

Share this post


Link to post
Share on other sites

LOL... wow, that was simple... I have so many other counters set up in this script, I can't believe that it didn't slap me in the head with a hammer...

 

Thank you BlueskyIS

Share this post


Link to post
Share on other sites

×

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.