Sometime, there is a need to have a csv parser for a simple list (1-column) or a mapping (2-column key-value pairs). It would be smart to configure the csv parser to return such flat structures directly.
A workaround for this would be
return array_map(function ($set) {
return array_shift($set);
}, $this->parseCsv($csv));
Sometime, there is a need to have a csv parser for a simple list (1-column) or a mapping (2-column key-value pairs). It would be smart to configure the csv parser to return such flat structures directly.
A workaround for this would be