Skip to content

Instantly share code, notes, and snippets.

@raihan-uddin
Forked from vrushank-snippets/Parse CSV files
Created March 14, 2020 09:36
Show Gist options
  • Save raihan-uddin/32f00874ad7fd792b64c4e3f218e1e10 to your computer and use it in GitHub Desktop.
Save raihan-uddin/32f00874ad7fd792b64c4e3f218e1e10 to your computer and use it in GitHub Desktop.
PHP : Parse CSV files
$fh = fopen("contacts.csv", "r");
while($line = fgetcsv($fh, 1000, ",")) {
echo "Contact: {$line[1]}";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment