I have a string like below
Final-Recipient: rfc822;[email protected]
Action: failed
Status: 5.1.1
Diagnostic-Code: smtp;550 5.1.1 RESOLVER.ADR.RecipNotFound; not found
I need to get each value as an associative array like
array('Final-Recipient'=>'rfc822;[email protected]',
'Action'=>'failed',
'Status'=>'5.1.1',....)
I was try with explode function,But it don't give result expected.
$result = array();
$temp = explode(';',$message);
foreach($temp as $value)
{
$temp2 = explode(':',$value);
$result[$temp[0]] = $result[$temp[1]];
}
print_r($result);
;when it's obviously not the delimiter in your input data?