PHP code example of rap2hpoutre / csv-to-associative-array

1. Go to this page and download the library: Download rap2hpoutre/csv-to-associative-array 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/ */

    

rap2hpoutre / csv-to-associative-array example snippets


[ 
  ['name' => 'raphael', 'email' => '[email protected]'], 
  ['name' => 'lisa',    'email' => '[email protected]'] 
]

$content = \Rap2hpoutre\Csv\csv_to_associative_array('path/to/csv/file.csv');