I have a table that looks like the following;
id header
1 fruit
4 header_example
9 test
13 money
I then have an array that used to contain each of the id’s, but I remove one. I now for example, have an array that looks like this:
array = [1, 9, 13]
How would I look at that array, and determine that the row with id=4 should be deleted?
Thanks!
On the MySQL side, you could just run this, using php to output the array contents into the IN clause:
On the PHP side, you could generate the appropriate contents: