There is an array of this type:
0 => string '"Datasheets","Image","Digi-Key Part Number","Manufacturer Part Number","Manufacturer","Description","Quantity Available","Factory Stock","Unit Price (USD)","@ qty","Minimum Quantity","Series","Accessory Type","Material","Color","For Use With/Related Products"' (length=262) 1 => string '"http://www.knowles.com/eng/content/download/3165/37817/version/2/file/bf-1861-000.pdf","http://media.digikey.com/Photos/Knowles%20Acoustics%20Photos/BF-1861-000.jpg","423-1158-ND","BF-1861-000","Knowles","ACOUSTIC DAMPER 1500 OHMS",1067,0,"1.67000",0,1,"BF","Damper","Metal Ferrule Housing","Green","Hearing Aids"' (length=314) It is required to break lines into arrays with a comma as a separator.
I tried to break using explode , but nothing happened.
The string index [0] is broken correctly, and the second with index [1] is broken incorrectly, because In the line in unnecessary places there is a separator.
Tell me how to ignore the extra delimiters so that when the array is broken down, the result is:
array (size=16) 0 => string '"Datasheets"' (length=15) 1 => string '"Image"' (length=7) 2 => string '"Digi-Key Part Number"' (length=22) 3 => string '"Manufacturer Part Number"' (length=26) 4 => string '"Manufacturer"' (length=14) 5 => string '"Description"' (length=13) 6 => string '"Quantity Available"' (length=20) 7 => string '"Factory Stock"' (length=15) 8 => string '"Unit Price (USD)"' (length=18) 9 => string '"@ qty"' (length=7) 10 => string '"Minimum Quantity"' (length=18) 11 => string '"Series"' (length=8) 12 => string '"Accessory Type"' (length=16) 13 => string '"Material"' (length=10) 14 => string '"Color"' (length=7) 15 => string '"For Use With/Related Products"' (length=31)
json_decode()aside and look carefully at my answer below the phrase “Upd. III” - Sergiks