1. Go to this page and download the library: Download alexskrypnyk/csvtable 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/ */
alexskrypnyk / csvtable example snippets
$csv = file_get_contents($csv_file);
print (new CsvTable($csv))->format();
// Parse semicolon-separated content.
$table = new CsvTable($csv_semicolon, ';');
// The same, reading from a file.
$table = CsvTable::fromFile($file_semicolon, ';');
// Using indices.
print (CsvTable::fromFile($file))->columnOrder([2, 0])->format();
// Using mixed names and indices.
print (CsvTable::fromFile($file))->onlyColumns(['Name', 2])->format();
$table = CsvTable::fromFile($file);
// Apply and use transformations.
$table->columnOrder(['City', 'Name']);
print $table->format();
// Reset and format without transformations.
print $table->resetColumns()->format();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.