Skip to content

huexotzinca/CSVTranslator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSVTranslator

A simple PHP CSV reader.

use CSVTranslator\CSVTranslator as CSV;

$file = CSV::getContent('path/to/file.csv');

// Process the content
// Or even can parse the content with table names.

$table = CSV::getContentWithKeys('path/to/file.csv', array(
  'column-name1',
  'column-name2',
      ));

$records = $table['data'];

// if the file have errors (incomplete data; count($keys) !== count($row))
$errors = $table['errors'];

// parse the $records to your ORM to populate DB.

About

A simple PHP CSV reader.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages