note 10784 added to String functions

From: Date: Mon, 22 Jan 2001 09:09:14 +0000
Subject: note 10784 added to String functions
Groups: php.notes 
Request: Send a blank email to php-notes+get-10061@lists.php.net to get a copy of this message
How do you split a string into tokens that are tab or comma delimited, but where the string isn't tokenized on quoted or escaped delimiters? For example, I want to be able to make a function csvSplit() where list ($val1, $val2, $val3) = csvSplit('str1,"str2,str2.5", str3'); would split appropriately. http://www.php.net/manual/en/ref.strings.php

« previous php.notes (#10061) next »