webent Posted April 26, 2008 Share Posted April 26, 2008 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) { Link to comment https://forums.phpfreaks.com/topic/103041-solved-skip-first-line-in-csv-file-import/ Share on other sites More sharing options...
BlueSkyIS Posted April 26, 2008 Share Posted April 26, 2008 $count = 0; while (($fields = fgetcsv($handle, 0, ",")) !== FALSE) { $count++; if ($count == 1) { continue; } Link to comment https://forums.phpfreaks.com/topic/103041-solved-skip-first-line-in-csv-file-import/#findComment-527794 Share on other sites More sharing options...
webent Posted April 26, 2008 Author Share Posted April 26, 2008 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 Link to comment https://forums.phpfreaks.com/topic/103041-solved-skip-first-line-in-csv-file-import/#findComment-527796 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.