{"id":15687590,"url":"https://github.com/dcblogdev/exportcsv","last_synced_at":"2025-10-11T13:33:09.755Z","repository":{"id":56964045,"uuid":"162601250","full_name":"dcblogdev/exportcsv","owner":"dcblogdev","description":"Export arrays to CSV","archived":false,"fork":false,"pushed_at":"2023-08-19T16:22:35.000Z","size":19,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T18:07:54.657Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcblogdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["dcblogdev"]}},"created_at":"2018-12-20T15:58:55.000Z","updated_at":"2024-08-12T19:44:12.000Z","dependencies_parsed_at":"2024-10-23T20:41:19.751Z","dependency_job_id":"f3908d04-75d6-4565-8a3b-ec0b6d682e43","html_url":"https://github.com/dcblogdev/exportcsv","commit_stats":{"total_commits":18,"total_committers":4,"mean_commits":4.5,"dds":0.5,"last_synced_commit":"c8fb9b1390989377d1920b5da09c109523453621"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dcblogdev/exportcsv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcblogdev%2Fexportcsv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcblogdev%2Fexportcsv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcblogdev%2Fexportcsv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcblogdev%2Fexportcsv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcblogdev","download_url":"https://codeload.github.com/dcblogdev/exportcsv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcblogdev%2Fexportcsv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007339,"owners_count":26084282,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hacktoberfest"],"created_at":"2024-10-03T17:50:15.254Z","updated_at":"2025-10-11T13:33:09.733Z","avatar_url":"https://github.com/dcblogdev.png","language":"PHP","readme":"[![Latest Version on Packagist](https://img.shields.io/packagist/v/dcblogdev/lexportcsv.svg?style=flat-square)](https://packagist.org/packages/dcblogdev/lexportcsv)\n[![Total Downloads](https://img.shields.io/packagist/dt/dcblogdev/lexportcsv.svg?style=flat-square)](https://packagist.org/packages/dcblogdev/lexportcsv)\n\n![Logo](https://repository-images.githubusercontent.com/162601250/24fed580-4856-11eb-8677-a058f79714c5)\n\nExport arrays to CSV\n\nInstall\nUsing composer include the repository by typing the following into a terminal\n\ncomposer require dcblogdev/exportcsv\n \n## Usage\n\nInclude the composer autoloader, import the ExportCsv namespace.\n\n```php\nuse Dcblogdev\\ExportCsv\\ExportCsv;\n\n//set filename\n$filename = 'test.csv';\n\n//set column names\n$headerFields = ['First Name', 'Last Name', 'Company', 'Created'];\n\n//create array\n$records = [];\n\n//loop through data and add to array\nforeach($contacts as $row) {\n    $records[] = [\n        $row-\u003efirstName,\n        $row-\u003elastName,\n        $row-\u003ecompanyName,\n        $row-\u003ecreated_at\n    ];\n}\n\n//OR set an array manually\n$records[] = ['name', 'last name', 'comy', 'created'];\n\n//send params to csv\nnew ExportCsv($records, $filename, $headerFields);\n```\n\n","funding_links":["https://github.com/sponsors/dcblogdev"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcblogdev%2Fexportcsv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcblogdev%2Fexportcsv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcblogdev%2Fexportcsv/lists"}