foreach into 1 variable

3 posts by 2 authors in: Forums > CMS Builder
Last Post: November 7, 2013   (RSS)

Hi Zaba

This should do it

<?
$recipients = array();

foreach ($notifyRecords as $record) {
    $recipients[] = $record['notify_email'];
}

$recipients = implode(', ', $recipients);

echo $recipients;
?>

Enjoy

By zaba - November 7, 2013

Hey Brownleather,

your solution works perfectly, thank you for taking the time to post. Much appreciated. All the best Chris.