I know it's not perfectly efficient but I posted it like that for 2 reasons:
1) It's exactly the same code as he already has, just moving the lines around.
2) It teaches dealing with associative arrays in the future eg, the email address as $key and the real name as $value.
I'm afraid I broke a rule I have "Don't post unless you are sure". The syntax I gave for mail() is wrong, this is correct:
$to = "mary@example.com" . ", " ; // note the comma not semi-colon
$to .= "kelly@example.com";
$headers = "To: Mary <mary@example.com>, Kelly <kelly@example.com>\r\n";
$headers .= "From: Birthday Reminder <birthday@example.com>\r\n";
$headers .= "Cc:
birthdayarchive@example.com\r\n";
$headers .= "Bcc:
birthdaycheck@example.com\r\n";
mail($to, $subject, $message, $headers);
Sorry about that, but I had just woken up.
:I