insert into table (name,other) values ('name1', 'other2'), ('name2', 'other2'), ('name3', 'other3')
это означает, что вы можете использовать foreach как
$values = Array();
foreach($array as $arr)
$values[] = "('{$arr['name']}','{$arr['name']}')";
query("insert into table values" . implode(', ', $values ));