PHP Parser
PHP Parser
(OP)
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
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
RE: PHP Parser
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.