PHP code example of msrana / yocsv

1. Go to this page and download the library: Download msrana/yocsv 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/ */

    

msrana / yocsv example snippets


use MsRana\YoCsv\Csv;
$csv = new Csv("../source/school.csv") // use right path name to ignore `FileNotFoundException`
$data = $csv->get(); // you will get all row as array

use MsRana\YoCsv\Csv;
$csv = new Csv();
$csv->read("file.csv");
$csv->get(); // return all data row as array

$csv->where('key',$value);
$csv->get(); // show result