Matching array keys
I have this array,
Array ( [campaign_title] => adasdasdasddsad [campaign_keyword] => asdsadasdasdasdasd [introduction] => asdasdasdasdasdasdsa [campaign_headline] => Array ( [0] => asdasdasdasdasdasdad ) [article] => Array ( [0] => asdasdasdasdasdasdasdasdsadas ) [save_multiple] => Save )
Basically I need away to send the the campaign_headline and article array to a DB so that each headline and article are saved to the same row, th开发者_StackOverflowen the next headline and article are saved to the same row etc
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. */
}
精彩评论