I receive data in the following format:
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Wed, 13 Apr 2005 15:42:54 GMT
X-Powered-By: ASP.NET
Connection: close
Content-Type: text/plain
People_ID,Acct_Name,Addr1,Addr2,Addr3,Addr4,City,State,ZIP,Addr_Changed,Phone,Phone_Changed,Country,Cntry_Descr,Person_Type,Last_Name_Org,First_Name,Middle_Name,Title,Suffix,Sp_Last_Name,Sp_First_Name,Sp_Middle_Name,Sp_Title,Sp_Suffix
"100000","Company Name","PO Box 123","","","","Any Town","CA","12345",11/15/2004,"",,"US","United States","O","Company Name","","","","","","","","",""
"100001","Company Name","123 Main","","","","Any Town","NY","12345",11/15/2003,"",,"US","United States","O","Company Name","","","","","","","","",""
I need to basically ignore the header info and then have the data parsed into an array. Their will always been two lines breaks between the header info and the first line of returned data. The first line of the returned data will always be the field names. However, the number of fields and their names will not always be the same so the code needs to be generic to handle different field names and numbers. The remaining lines have the data, one record per line, comma delimited. I don't want the "" as part of the data.
Sorry I haven't been able to come up with any code as my skill set with PHP string functions is limited.
Thanks