Skip to content

Instantly share code, notes, and snippets.

@diversen
Created February 14, 2019 12:48
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 diversen/9cb9b84540dbaa31ed9cba57d7e64997 to your computer and use it in GitHub Desktop.
Save diversen/9cb9b84540dbaa31ed9cba57d7e64997 to your computer and use it in GitHub Desktop.
<?php
// Search CSV
$csv = './Debitorer.csv';
$result = [];
$i = 0;
if (($handle = fopen($csv, "r")) !== false) {
while (($data = fgetcsv($handle, 1000, ";")) !== false) {
$i++;
// Column to search is 0 value to search for is ''
if ($data[0] == '') {
echo $i . "\n";
var_dump($data);
}
}
fclose($handle);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment