I am writing dynamic insert statements in a script of mine and i'm running into a problem on the explode() function.
As you can see from the data, there is a , (comma) in the line.
The problem is i explode on COMMA and there is a COMMA in the line.
"1","PEN PGN,INSO"," CP"," ","15","LA","1301"
Here the code that breaking
$line=str_replace("\"", "", $line);
$line=str_replace("'", "", $line);
$filedata = explode(",", $line);
So how can i explode this line if i have COMMAs in the line?