[thelist] Ereg

Chris Price chris.price at choctaw.co.uk
Wed May 17 16:52:35 CDT 2006


I am uploading a csv file to the server and then exploding it in php to give
me data in arrays.

When an entry in the csv file has a comma in it, that entry is surrounded by
double quotes which helps to differentiate a textual comma from a delimiting
comma.

I want to escape the textual commas and delete the quotes before exploding
the strings into arrays.

I figured I could find the occurrences of "foo,foo" using ereg and replace
them with foo,foo but I'm not sure how I should do that or if there is a
much simpler solution anyway.

Any ideas?

-- 
Chris Price

Choctaw

chris.price at choctaw.co.uk
http://www.choctaw.co.uk

 





More information about the thelist mailing list