Code Monkey home page Code Monkey logo

csv-convert's Introduction

CSV CONVERT

Convertendo arquivos csv para array

Como usar:

require 'src/Convert.php';

$results = Convert\CSV::toArray('/path-to-file/file.csv', ',');

//Results
array(2) { [0]=> string(14) "22637212000111" [1]=> string(6) "171665" }
array(2) { [0]=> string(14) "52079369000112" [1]=> string(6) "172837" }
array(2) { [0]=> string(14) "51055810000101" [1]=> string(6) "173288" }
array(2) { [0]=> string(14) "12404336000148" [1]=> string(6) "138230" }
array(2) { [0]=> string(14) "21675698000188" [1]=> string(6) "169931" }
array(2) { [0]=> string(14) "99349416000441" [1]=> string(6) "172536" }

Parâmetros:

Parâmetro Tipo Descrição
file string Obrigatório. Arquivo CSV
separator string Separador de coluna do CSV, Padrão ;

Arquivo CSV Exemplo

22637212000111,171665
52079369000112,172837
51055810000101,173288
12404336000148,138230
21675698000188,169931
99349416000441,172536

csv-convert's People

Contributors

kenowlee avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

cluxnei rnsantos5

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.