i have the following code:
$var1="bmx"
$newdata = implode(",", $dx);
$queryinsert = "INSERT INTO table VALUES ($var1,$newdata)";
but with this code i get some like
INSERT INTO table VALUES (bmx,black,white, green, yellow,grey)";
and i need to create a new row for each color, like
INSERT INTO table VALUES (bmx,white)";
INSERT INTO table VALUES (bmx,black)";etc...
i think i should use a foreach but i don't know how.