Skip to content

Instantly share code, notes, and snippets.

Last active Apr 3, 2016
What would you like to do?
namespace Acme\Csv;
class Reader extends \League\Csv\Reader
* @param int $offsetIndex
* @return Generator
public function fetchDeduplicate($offsetIndex=0)
$iterator = $this->getQueryIterator();
foreach ($iterator as $row) {
yield $row[$offsetIndex] => implode(",", $row);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment