1

I want to convert such string:

Zeroth "First" "Sec ond" "Th\"ird" Four th Six'th 'Seventh'

To array:

[0] => Zeroth
[1] => First
[2] => Sec ond
[3] => Thi"ird
[4] => Four
[5] => th
[6] => Six'th
[7] => 'Seventh'

Function should be fast and take care of double-quotes only.

peku33
  • 3,628
  • 3
  • 26
  • 44
  • 3
    possible duplicate of [PHP explode the string, but treat words in quotes as a single word](http://stackoverflow.com/questions/2202435/php-explode-the-string-but-treat-words-in-quotes-as-a-single-word) – kba Aug 23 '14 at 21:11
  • 1
    `$myArray = str_getcsv($myString, ' ');` – Mark Baker Aug 23 '14 at 21:20

0 Answers0