title: Insert multiple rows with PDO prepared statements
body: <p>I would like to know if it is possible to insert multiple rows using one prepared statement.
  Below is an example of how I would normally insert one row into the db:</p>
  
  <pre><code>$params=array();
  $params[':val1']="val1";
  $params[':val2']="val2";
  $params[':val3']="val3";
  $sql="INSERT INTO table VALUES (col1,col2,col3) VALUES (:val1,:val2,:val3)";
  $stmt=DB::getInstance()-&gt;prepare($sql);
  $stmt-&gt;execute($params);
  </code></pre>
  
  <p>The values I want to insert will come from an array, for example:
      $values[0]['val1'];
      $values[0]['val2'];
      $values[0]['val3'];
      $values[1]['val1'];
      $values[2]['val2'];</p>
  
  <p>etc.</p>
  
  <p>This code may have to insert a few hundred rows at once, I thought about creating a loop to create hundreds of params and then append the sql statement with an extra insert for each row but I thought there must be a better way. What would be the best way to do this?</p>