Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP Parser

Status
Not open for further replies.

Brianfree

Programmer
Feb 6, 2008
220
0
0
GB
Good Morning, i am looking for some sample code which i can adapt to do the following in php...

1) Open a source.csv file and fetch the data from row 1
2) the data from row 1 is to be passed into a variable which i then use as part of an api
3) the result from the api is to be written to destination.csv along with the variable
4) flag the data from row 1 on source.csv as done
5) move to row 2... repeats the process until all rows are processed.

Is there anyone who can point me in the right direction?

Many thanks

Brian
 
You make an excellent argument for using a database instead of a CSV file.

Without knowing the specifics of the CSV data (is it small enough to do all this processing in active memory?...is this function sporadic enough to not require a lot of processing resources?...are you able to write to the source.csv file to flag rows?) it is difficult to offer any meaningful answers.

Look to a database. This is what databases are for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top