How do I split the following string which is seperated by the ',' delimiter to an array in PHP?
String:
[{"sku":"PAP","name":"Butter","price":23,"quantity":2},{"sku":"PER","name":"Garlic","price":25,"quantity":1}]
Required Array:
$array[0]= "sku":"PAP","name":"Butter","price":23,"quantity":2
$array[1]= "sku":"PER","name":"Garlic","price":25,"quantity":1
I am not able to split based on the delimiter',' since it is present in the array elements.
json_decodefunction:$array = json_decode($json, true);