I have an array with information which looks more or less like this:
$data[] = array(\'content\'=>\'asd\');
$data[] = array(\'content\'=>\'asdf\');
to insert multiple rows you can use Zend_Db
$stmt = $table->getAdapter()->prepare('INSERT INTO tablename (col1, col2, col3) VALUES (?, ?, ?), (?, ?, ?)');
$stmt->execute( array($value1, $value2, $value3, $value4, $value5, $value6) );
(from Bill Karwin)
in your case we can change that to this code:
$data[] = array('content'=>'asd');
$data[] = array('content'=>'asdf');
$stmt = $table->getAdapter()->prepare('INSERT INTO table (col1) VALUES (?), (?)');
$stmt->execute( $data );
to generate these '(?), (?)' dynamically, incase the data is dynamic, you can try using this snippet:
$values = implode(',',array_fill(0,count($data),'(?)'));
hope this helps
regards, Riki Risnandar