Error in Array

3 posts by 2 authors in: Forums > CMS Builder
Last Post: January 30, 2012   (RSS)

Hi All,

In an Ajax implementation that sends out emails, I’m using the following code to create a list of the recipient's email addresses separated by a comma.
// Get email list of those members with notifications set to 1.

list($emailList,) = getRecords(array(
"tableName" => "accounts",
"where" => "notifications = 1",
));

foreach( $emailList as $record ) {

$emailList.= $record['email'] .",";

}

Problem is that when the list is created, the first email address has the word "Array" preceding it, IE:
Arraymyemail@bellsouth.net; jerry@jkwebdesigns.com
Any suggestions would be super.

Thanks,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [Jason] Error in Array

Oops.

Sometimes I can't see the forest because the trees seem to get in the way.

Thanks Jason,

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php