Jump to content

Get Data Out Of Array!


stig1

Recommended Posts

I have the current data show up when I do a var_dump.

 

Code

$result = $wrap->get_lists();

echo "Result of lists:<br />";

if($result->was_successful()) {

    echo "Got lists\n<br /><pre>";
    var_dump($result->response);
   //print_r($result->response);

} else {

   echo 'Failed with code '.$result->http_status_code."\n<br /><pre>";
    var_dump($result->response);

}
echo '</pre>';

Data Output

array(303) {
  [0]=>
  object(stdClass)#5 (2) {
    ["ListID"]=>
    string(32) "df2d1497b0f4bdc3b8b77863f6721025"
    ["Name"]=>
    string(14) "DATA1"
  }
  [1]=>
  object(stdClass)#6 (2) {
    ["ListID"]=>
    string(32) "f44d9acf655e914b944d7174bdd521ff"
    ["Name"]=>
    string(14) "DATA2"
  }
  [2]=>
  object(stdClass)#7 (2) {
    ["ListID"]=>
    string(32) "c84f4ba6b86bc508e6922f4ca44ab41c"
    ["Name"]=>
    string(14) "DATA3"
  }
  [3]=>
  object(stdClass)#8 (2) {
    ["ListID"]=>
    string(32) "b7dc652cd5060194362f19667ddf47e9"
    ["Name"]=>
    string(14) "DATA4"
  }
}

 

What I need to achieve is get the data in "ListID" out so I can run "ListID" through another function of mine, to delete records. Any ideas, how I would get "ListID" values out of the array?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.