Skip to content

Flat return values for csv parser #1

Description

@hgiesenow

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));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions