I have an array of names. My table structure is:
id | name
What would be the best way to insert each name from the array in to a separate row in the table?
id | name
1 | John
2 | James
I was thinking about looping through the array in PHP bu there must be a better way?
INSERTstatetment, example,INSERT INTO tableName VALUES (1, 'John'), (2, 'James')