我有这个数组,
Array ( [campaign_title] => adasdasdasddsad [campaign_keyword] => asdsadasdasdasdasd [introduction] => asdasdasdasdasdasdsa [campaign_headline] => Array ( [0] => asdasdasdasdasdasdad ) [article] => Array ( [0] => asdasdasdasdasdasdasdasdsadas ) [save_multiple] => Save )
基本上我需要将campaign_headline和article数组发送到数据库,以便将每个标题和文章保存到同一行,然后将下一个标题和文章保存到同一行等
答案 0 :(得分:1)
foreach ($x['campaign_headline'] as $key => $headline)
{
store_into_db($headline, $x['article'][$key]);
}
function store_into_db($headline, $article)
{
/* there you must store article into DB, i can write this code but i must more infomraiton about, db server type and tables password etc. */
}