2017 © Pedro PelĂĄez
 

library csv

CSV handling

image

gregwar/csv

CSV handling

  • Tuesday, September 2, 2014
  • by Gregwar
  • Repository
  • 1 Watchers
  • 2 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

CSV

This is a really simple CSV file readed that helps to do the columns matching with the file and the PHP world, for instance:, (*1)

<?php

// Creates a loader and define the columns
$loader = new Gregwar\CSV\CSVFile;
$loader->setColumns(array('lastname', 'firstname'));

// Some data
$data = array(
    array('firstname' => 'Bob', 'lastname' => 'Smith', 'age' => 30),
    array('lastname' => 'Taylor', 'firstname' => 'William', 'age' => 40),
);

// Save the data to data.csv, using the above columns, note that age will
// be lost
$loader->save('data.csv', $data);

// Loads the data back using the same columns matching
$data = $loader->load('data.csv');
var_dump($data);

The Versions

02/09 2014

dev-master

9999999-dev https://github.com/Gregwar/CSV

CSV handling

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

csv