inserting multiple rows in sqlite using implode <p>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.</p> <pre><code>$sql = array(); foreach($_POST as $key =&gt; $value ) { $sql[] = '("'.sqlite_escape_string($key['cust_name']).'", '.$key['address'].')'; } $stmt = $db-&gt;prepare('INSERT INTO customers VALUES (cust_name, address) '.implode(','. $sql)); $stmt-&gt;execute($sql); </code></pre>