im stuck getting it to pull all the emails out of the array
//////this will pull the emails foreach ($email as $e) { $recipients = "$e, "; }
$mailer->send( '$recipients', /// <-------------- how do i get the multiple emails into there '"name" <info@email.com>', $subject );
Longer approach:
$recipients = ''; foreach ($email as $e) { $recipients .= "$e, "; } $recipients = substr($recipients, 0, -2); // remove last comma and space
Shorter approach:
$recipients = implode(', ', $email);