getting list of empty beans from get_full_list

Hi all,
I’m using get_full_list to, well, get a full list. The array I get back has the correct number of elements, but what it has doesn’t seem to be what I get when I iterate over it. Here’s my code:

$userSearchBeanID = null;
$userSearchBean = BeanFactory::GetBean(‘Users’, $userSearchBeanID);
$userSearchResults = $userSearchBean->get_full_list("", “users.first_name=‘Alex’”);
echo “

” . count($userSearchResults) . " results

";
foreach($userBean as $userSearchResults) {
echo “

Var dump

”;
var_dump($userBean);
echo "

Name

Name: " . $userBean->name . “.
”;
}

The oddest thing happens. My first echo says I have “1 results”, which is correct. But the names don’t print, so I only get “Name: .”. This is because of the strangest thing of all: the var_dump calls show that my $userBean variable in the for loop has all null values. It’s the right object, as far as I can tell, but it has nulls and empty strings for every property. On top of that, there’s not just one, there are over a hundred iterations through that foreach loop.

I’m very new to SC and its beans, so hopefully I’m missing something easy and obvious. But I’m following samples I found online, and the logic is easy and makes sense as it is. Why would I get more than a hundred beans with null property values, when the array returned by get_full_list is just one element? Thanks for any ideas!

Ignore me! I had the two parameters passed to my foreach reversed. I guess it was breaking my one bean into characters, or some iterable, and casting each of those as empty beans. Mystery solved.