Skip to content

Instantly share code, notes, and snippets.

@crisweiser
Created August 15, 2014 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crisweiser/66ca9f4d0553ee4f8700 to your computer and use it in GitHub Desktop.
Save crisweiser/66ca9f4d0553ee4f8700 to your computer and use it in GitHub Desktop.
/*
* This code reads a CSV file and extracts each item into the appropriate variable for processing.
/*
$handle = fopen("file.csv", 'r');
while(($data = fgetcsv($handle, 1000, ",")) !== false)
{
list($col1, $col2, ...) = $data;
}
fclose($handle);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment