INSERT INTO table VALUES ('1'),('2'),('3'),('4')
show code
<?php
$lines = array('1','2','3','4');
$count = count($lines);
$i = 0;
$query = "INSERT INTO table VALUES ";
foreach($lines as $line){
$i++;
if ($count == $i) {
$query .= "('".$line."')";
}
else{
$query .= "('".$line."'),";
}
}
echo $query