note 40896 deleted from function.fgetcsv by danbrown
| From: | danbrown@php.net | Date: | Sun, 17 May 2009 18:19:28 +0000 |
| Subject: | note 40896 deleted from function.fgetcsv by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155102@lists.php.net to get a copy of this message | ||
Note Submitter: bu at orbitel dot bg
----
I found a way to parse CSVs with Perl RegExps and it's a lot faster and more efficient than the
conventional fgetcsv() way.
The fgetcsv() took more than 2 minutes to parse a 15,000 lined file while my function takes 6 to 7
secs on a Celeron 366 MHz prehistoric machine.
Here's a link to the source of my function.
fgetcsvfromline() source
http://bu.orbitel.bg/fgetcsvfromline.php
fgetcsvfromline() in action
http://bu.orbitel.bg/csv.php
Please let me know if you use it or if you've found a better solution.