Code Monkey home page Code Monkey logo

csv's Introduction

CSV

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

League\Csv is a simple library to ease CSV parsing, writing and filtering in PHP. The goal of the library is to be powerful while remaining lightweight, by utilizing PHP native classes whenever possible.

League\Csv was designed for developers who want to deal with CSV data using modern code and without the high levels of bootstrap and low-levels of usefulness provided by existing core functions or third party-code.

This package is compliant with PSR-2 and PSR-4.

System Requirements

You need PHP >= 5.4.0 or HHVM >= 3.2 and the mbstring extension to use League\Csv but the latest stable version of PHP/HHVM is recommended.

Install

Install League\Csv using Composer.

composer require league/csv

This will edit (or create) your composer.json file and automatically choose the most recent version, for example: ~6.0

Going Solo

You can also use League\Csv without using Composer by downloading the library and using a PSR-4 compatible autoloader.

Documentation

League\Csv is fully documented. Contribute to this documentation in the gh-pages branch

Tips

  • When creating or editing a document using League\Csv\Writer, first insert all the data that needs to be inserted before anything else. If you manipulate your data before insertion, you may change the file cursor position and get unexpected results.

  • Even though you can iterate over you document using League\Csv\Writer class, it is recommend and best practice to iterate over you CSV using the League\Csv\Reader class to avoid any issue.

  • The library assumes that your data is UTF-8 encoded. If your are dealing with non-unicode data you must enable your data conversion into UTF-8 otherwise output methods will fail. You can transcode your CSV :

Testing

$ phpunit

Contributing

Please see CONTRIBUTING for details.

Credits

csv's People

Contributors

duncan3dc avatar grahamcampbell avatar heart1010 avatar mfrost503 avatar nyamsprod avatar sagikazarmark avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.