note 110582 deleted from function.str-getcsv by danbrown

From: Date: Thu, 06 Dec 2012 14:20:16 +0000
Subject: note 110582 deleted from function.str-getcsv by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-192324@lists.php.net to get a copy of this message
Note Submitter: martin at larsen dot dk ---- The solution from w_barath at hotmail dot com does not work if there is no enclosure. The first char in the first field and the last char in the last field will be skipped. It can be solved by adding this line as the first line in the function: if($enclosure=='') $input = '"' . $input . '"'; This will ensure there is "something" to cut off by substring().

« previous php.notes (#192324) next »