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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.