I am receiving the following arrays from a form:
array (size=1)
'checkbox' =>
array (size=2)
0 => string '14' (length=2)
1 => string '13' (length=2)
2 => string '15' (length=2)
array (size=1)
'id' => string '1' (length=1)
I need to build a query looking like this:
$sql = "INSERT INTO table(column1,column2) VALUES (14,1),(13,1),(15,1)";And the first array will be different every time based on the checked checkboxes.