kenowlee / csv-convert
Convertendo CSV para Array
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 2
Open Issues: 1
pkg:composer/kenowlee/csv-convert
Requires
- php: >=5.2
This package is auto-updated.
Last update: 2025-11-26 00:55:51 UTC
README
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