PHP code example of svenkuegler / php-csv-validator

1. Go to this page and download the library: Download svenkuegler/php-csv-validator 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/ */

    

svenkuegler / php-csv-validator example snippets




$validator = new PhpCsvValidator();
$validator->loadSchemeFromFile("tests/files/example-scheme2.json");

if($validator->isValidFile("tests/files/example.csv")) {
    echo "File is Valid";
} else {
    echo "File is Invalid!";
}
bash
composer