我有以下陣列,我要插入到與領域表groupi_id,APPLICATION_ID和grant_id插入陣列
陣列是
array(
'ApplicationsGrant' => array(
'group_id' => array(
(int) 0 => '72',
(int) 1 => '72'
),
'application_id' => array(
(int) 0 => '1',
(int) 1 => '2'
),
'grant_id' => array(
(int) 0 => 56,
(int) 1 => 57
)
)
)
欲每個子即插入行數組使用數組鍵。所以在上面的例子中會插入2行像這樣
插入表格(group_id
。application_id
,grant_id
)值(72,1,56); 插入表格(group_id
。application_id
,grant_id
)值(72,2,57);
我該怎麼做?