How to parse CSV with values that contain a comma?

TogTooftflugh

New Member
Assuming you have a string as follows:\[code\]$str = 'one value, two value, "three, cool value", four value';\[/code\]How would you make it an array as follows:\[code\]$arr = array('one value', 'two value', 'three, cool value', 'four value');\[/code\](That's all about CSV and values that contain a comma and thus are double quoted.)
 
Back
Top