PHP dynamically create CSV: Skip the first line of a CSV file

后端 未结 8 1394
暖寄归人
暖寄归人 2020-12-05 13:19

I am trying to import a CSV file. Due to the program we use, the first row is basically all headers that I would like to skip since I\'ve already put my own headers in via

8条回答
  •  独厮守ぢ
    2020-12-05 13:45

    $count = 0;
    while (($fields = fgetcsv($handle, 0, ",")) !== FALSE) {
        $count++;
        if ($count == 1) { continue; }
    

提交回复
热议问题