Skip to content

Instantly share code, notes, and snippets.

@crisweiser
Created August 15, 2014 20:12
Show Gist options
  • 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