[eluser]ppwalks[/eluser]
I have a form which allows the user to create products and add them to category, the categories are linked through a joining table and many products can belong to many categories.
I have extracted the post data into an array, but what I'm struggling with is updating the database with multiple entries pertaining to one product_id ie..
product_id = 1 -> category_id = 4
product_id = 1 -> category_id = 6
product_id = 1 -> category_id = 7
product_id = 1 -> category_id = 34
My logic is to run a foreach loop into the database but don't know how, can someone point me in the right direction please!