Error in Array

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

Re: [gkornbluth] Error in Array

By Jason - January 30, 2012

Hi Jerry,

The issue here is that your record set and your list string both use the variable name $emailList. On the first iteration of the loop, $emailList is an array.

Try this:

// Get email list of those members with notifications set to 1.

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

$emailList = "";

foreach( $emailListRecords as $record ) {

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

}


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

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