$test = "\"czarft\" <
[email protected]>";
$t= $test;
$tos = preg_split ("/;|,/", $t);
foreach ($tos as $to) {
preg_match("/(.*?)<?(.*?)>?/i", $to, $matches);
print_r($matches);
$mail->AddAddress($matches[2],str_replace('"','',$matches[1]));
}
---------------------
Result
Array
(
[0] =>
[1] =>
[2] =>
)
-------
please help me ! what is wrong??
Thank You