×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Fabian Constien
Added: Nov 5, 2017 1:36 PM
Views: 2540
Tags: no tags
  1. // csv einlesen
  2. $csv_rows = array_map(function($v) {
  3.     global $conf;
  4.     return str_getcsv($v, $conf['import']['csv']['delimiter']);
  5. }, file($conf['import']['csv']['file']));
  6. $csv_header = array_shift($csv_rows);
  7. $csv_result = array();
  8. foreach ($csv_rows as $csv_row) {
  9.     $csv_result[] = array_combine($csv_header, $csv_row);
  10. }
  11. // Ergebnis
  12. $test = $csv_result[1]['email'];