$records
$records : \Iterator
The CSV records collection.
Represents the result set of a {@link Reader} processed by a {@link Statement}.
fetchPairs(string|integer $offset_index, string|integer $value_index = 1)
Returns the next key-value pairs from a result set (first column is the key, second column is the value).
By default if no column index is provided:
string|integer | $offset_index | The column index to serve as offset |
string|integer | $value_index | The column index to serve as value |
getColumnIndexByKey(\League\Csv\int $index, \League\Csv\string $error_message) : integer|string
Returns the selected column name according to its offset.
\League\Csv\int | $index | |
\League\Csv\string | $error_message |
if the field is invalid or not found