note 114764 modified in function.str-getcsv by cmb

From: Date: Thu, 26 Sep 2019 12:19:53 +0000
Subject: note 114764 modified in function.str-getcsv by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212360@lists.php.net to get a copy of this message
[Editor's Note (cmb): that does not produce the desired results, if fields contain linebreaks.] Handy one liner to parse a CSV file into an array <?php $csv = array_map('str_getcsv', file('data.csv')); ?> --was-- Handy one liner to parse a CSV file into an array <?php $csv = array_map('str_getcsv', file('data.csv')); ?> http://php.net/manual/en/function.str-getcsv.php

« previous php.notes (#212360) next »