I have two PHP variables, both strings:
$friendslist = \"2323443,7245,284683,345123,8456234,95432\" $id = \"10288272\";
The structure of the t
$comma = ""; $values = ""; $array = explode(",",$friendslist); foreach ($array as $friendid) { $values .= $comma."($id,$friendid)"; $comma = ","; } $sql = "INSERT INTO UserLinks (User_1, User_2) VALUES $values"