{"id":19210678,"url":"https://github.com/mhndev/csv","last_synced_at":"2025-05-12T19:26:41.265Z","repository":{"id":62527810,"uuid":"59016112","full_name":"mhndev/csv","owner":"mhndev","description":"library for working with csv","archived":false,"fork":false,"pushed_at":"2017-02-20T07:40:33.000Z","size":21,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-04-20T17:37:18.356Z","etag":null,"topics":["csv","csv-database","csv-parser","csv-reader"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mhndev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-17T11:21:49.000Z","updated_at":"2018-08-09T14:40:54.000Z","dependencies_parsed_at":"2022-11-02T14:02:51.120Z","dependency_job_id":null,"html_url":"https://github.com/mhndev/csv","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhndev%2Fcsv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhndev%2Fcsv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhndev%2Fcsv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhndev%2Fcsv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhndev","download_url":"https://codeload.github.com/mhndev/csv/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253807298,"owners_count":21967335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","csv-database","csv-parser","csv-reader"],"created_at":"2024-11-09T13:36:49.891Z","updated_at":"2025-05-12T19:26:41.235Z","avatar_url":"https://github.com/mhndev.png","language":"PHP","readme":"[![Build Status](https://travis-ci.org/mhndev/csv.svg?branch=1.3.1)](https://travis-ci.org/mhndev/csv)\n\u003ca href=\"https://packagist.org/packages/mhndev/csv\"\u003e\u003cimg src=\"https://poser.pugx.org/mhndev/csv/d/total.svg\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/mhndev/csv\"\u003e\u003cimg src=\"https://poser.pugx.org/mhndev/csv/v/stable.svg\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/mhndev/csv\"\u003e\u003cimg src=\"https://poser.pugx.org/mhndev/csv/license.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\n## CSV\n\npowerful and fully tested php library to work with csv files\n\n### features :\n#### convert an array to a csv file\n#### convert a csv file to an array\n#### convert a csv file to an array using php generators\n#### delete a line from csv file by line number\n#### delete multiple line from csv file by specific column value\n#### update a line from a csv file by line number\n#### update multiple line from a csv file by specific column value\n#### find one line from a csv file by specific column value\n#### find many line from a csv file by specific column value\n\n\n## Sample Usage\n\n```php\n\nuse mhndev\\csv\\Csv;\n\n$csv = new Csv();\n$sampleArray = [[1,2,3,4,5],[6,7,8,9,10]];\n$filename =\"/path/to/test.csv\";\n$csv-\u003earrayToCsv($sampleArray, $filename);\n$resultArrayIterator = $csv-\u003ecsvToArrayUsingGenerator($filename);\n\n\n\n\n$csv = new Csv();\n$sampleArray = [[1,2,3,4,5],[6,7,8,9,10],[11,12,13,14,15]];\n$filename =\"/path/to/test.csv\";\n$csv-\u003earrayToCsv($sampleArray, $filename);\n$csv-\u003edeleteOneLineById($filename, 1);\n\n\n$csv = new Csv();\n$sampleArray = [[1,2,3,4,5],[6,7,8,9,10],[6,'hamid',8,9,'majid']];\n$filename =\"/path/to/test.csv\";\n$csv-\u003earrayToCsv($sampleArray, $filename);\n$csv-\u003eupdateLineBy($filename, [2=\u003e8] , [11,12,13,14,15]);\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhndev%2Fcsv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhndev%2Fcsv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhndev%2Fcsv/lists"}