Welcome Guest, Not a member yet? Register   Sign In
XML XHR Emails
#2

[eluser]kirtan.n[/eluser]
you need to embed one more foreach

function addemails($emailarray)
{
foreach($emailarray as $e)
{
foreach($e as $e2)//need one more
{
if(isset($e2[‘attachments’]) && $e2[‘attachments’] != null)
{
// my embedded foreach
foreach($e2[‘attachments’] as $w)
{
$insrt[‘attchdata’] = $w[‘img’];
$insrt[‘extension’] = $w[‘type’];
$this->db->insert(‘attachments’, $insrt);
}
}

$insert = array(‘toaddress’ => $e[‘toaddress’],
‘fromaddress’ => $e[‘fromaddress’],
‘subject’ => $e[‘subject’],
‘requestedapp’ => $e[‘requestedapp’],
‘priority’ => $e[‘priority’],
‘attempts’ => 0,
‘logdate’ => date(‘Y-m-d H:iConfused’));

$this->db->insert(‘email’, $insert);
}
}


}


Messages In This Thread
XML XHR Emails - by El Forum - 10-08-2010, 04:29 PM
XML XHR Emails - by El Forum - 10-08-2010, 06:48 PM
XML XHR Emails - by El Forum - 10-09-2010, 12:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB