I have tried to insert multiple rows but got empty rows in database and other errors. So,tried to use implode (as a better alternative?) but must be doing something wrong here.
$sql = array();
foreach($_POST as $key => $value ) {
$sql[] = '("'.sqlite_escape_string($key['cust_name']).'", '.$key['address'].')';
}
$stmt = $db->prepare('INSERT INTO customers VALUES (cust_name, address) '.implode(','. $sql));
$stmt->execute($sql);