Add Array data to database
Posted on 2014-03-05
I have an array of data from an external file which I want to import into my database. So far I can print the ARRAY to the screen.
I have attached the array data in a file (this is how it looks when I print it to the screen) which shows an example with three entries. When I import it into my database I want it to overwrite any duplicates.
I presume I need a foreach loop to read and insert the data?
I'm using PHP / MySQL.