PHP code example of akutaktau / csv-importer

1. Go to this page and download the library: Download akutaktau/csv-importer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

akutaktau / csv-importer example snippets


$this->loadComponent('CsvImporter.ImportCsv');

$this->ImportCsv->getTables();

$this->ImportCsv->getFields($table);

$this->ImportCsv->saveFile($data['field'],$data['tables'],$files['inputNameFromForm'],$delimiter);

$data['tables'] = 'tableName';

$files = $this->getRequest()->getUploadedFiles();