vinavb
Active member
I have line code. I want insert 1 array to db.
this is code i use model to save. But i want using datawriter save all content .
How to use dw insert array to db ?
Thank !!!
PHP:
$tests = array(
'1' => 'asdas',
'2' => 'asdas',
'3' => 'asdas',
'4' => 'asdas',
......
);
foreach($tests as $test){
$testid = $db->insert('******_testcontent', array(
'testname' => $test
));
$db->insert('******_tests', array(
'testcontentid' => $testid,
'threadid' => $threadid,
'dateline' => XenForo_Application::$time,
));
}
this is code i use model to save. But i want using datawriter save all content .
How to use dw insert array to db ?
Thank !!!