note 88141 modified in function.str-getcsv by felipe
| From: | felipe@php.net | Date: | Sat, 17 Jan 2009 01:05:41 +0000 |
| Subject: | note 88141 modified in function.str-getcsv by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-149350@lists.php.net to get a copy of this message | ||
Thanks Rob, have used your code. It needs a minor tweak so that the delimiter option is processed as
it should be. Line 5 should read:
<?php
$expr="/$delimiter(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))/";
// added ?>
instead of:
<?php
$expr="/,(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))/"; // added
?>
JS, London
--was--
Thanks Rob, have used your code. It needs a minor tweak so that the delimiter option is processed as
it should be. Line 5 should read:
$expr="/$delimiter(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))/";
// added
instead of:
$expr="/,(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))/"; //
added
JS, London
http://php.net/manual/en/function.str-getcsv.php