Skip to content

foreach() to retrieve records only working once #40

Description

@talkingpixels

Hi, I'm trying to loop through an array of ids and return some corresponding records, something like this...

foreach (['recHg30ki6MeYP40s','recvtmtL2umW0fDzT'] as $attr){
	$item = $items->from('rows')->where('id', '=', $attr)->get();
	print_r($item);
}

It outputs the array correctly in the first loop, but second (or more) loop return nothing and the following warning:

Warning:  array_filter() expects parameter 1 to be array, object given in /Users/.../vendor/nahid/jsonq/src/JsonQueriable.php on line 393

Any thoughts? Could it be something to do with pointers?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions