title: How to insert array values into multiple rows of a column in a database table?
body: <p>i have been trying to write a program to insert the array values in multiple rows of a column in a database table. After lot of trial I couldn't get the proper output I wanted. </p>
  
  <p>My database table looks like this</p>
  
  <pre><code>    id   | values  |
      1    |         |
      2    |         |
      4    |         |
      5    |         |
      6    |         |
  </code></pre>
  
  <p>and I have 2nd column values as an array and I want to enter those values in the second column.</p>
  
  <p>The output should look like this:-</p>
  
  <pre><code>    id   | values  |
      1    |     2   |
      2    |     3   |
      4    |     7   |
      5    |     9   |
      6    |     10  |
  </code></pre>
  
  <p>So, I have two array values <code>$id</code> and <code>$values</code>...So, I want to fill <code>$values</code> in each row of the column for each respective <code>$id</code> values</p>
  
  <p>NOTE : <code>$id</code> is already filled in the database</p>