Skip to content

The-Road-Bunch/csv-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

theroadbunch/csv-machine

A separation values manipulation library

build status scrutinzer quality score Code Coverage License: MIT

Contents

  1. Release Notes
  2. Installation
  3. Basic Usage
    a. Creating a CSV
  4. Formatters

composer require theroadbunch/csv-machine

<?php

// create a new Writer object
$csv = new \RoadBunch\Csv\Writer();

// set the header
$csv->setHeader([ 'Column A', 'Column B' ]);

// add some rows
$csv->addRow([ 'data_one_a', 'data_one_b' ]);
$csv->addRow([ 'data_two_a', 'data_two_b' ]);

// save the CSV to a file
$csv->saveToFile('/path/to/filename.csv');

// write the csv to a string
echo $csv->writeToString();

About

A separation values manipulation library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages