2012-09-09 81 views

回答

0
$file = file_get_contents('emails.txt'); 
$file = explode(',',$file); 
foreach ($file as $recipient) { 
    $recipient = explode('<',$recipient); 
    $name = trim($recipient[0]); 
    $name = str_replace("'",'',$name); // remove apostrophes 
    $name = str_replace('"','',$name); // remove double quotes 
    $email = str_replace('>','',$recipient[1]); // remove ">" 
    echo $name . ' ----- ' . $email . '<br />'; 
} 
+0

非常感謝!這工作完美! –

相關問題