Fight this for what seems, as always.
I have an array:
$url_array
It contains this information:
Array (
[ppp] => Array (
[0] => stdClass Object (
[id] => 46660
[entity_id] => 0
[redirect_url] => http:
[type] => Image
)
[1] => stdClass Object (
[id] => 52662
[entity_id] => 0
[pixel_redirect_url] => http:
[type] => Image
)
[2] => stdClass Object (
[id] => 53877
[entity_id] => 0
[redirect_url] => http:
[pixel_type] => Image
)
)
[total_count] => 3
)
I need to go through it and do things for each variable. I can make this work:
foreach ($piggies_array as $key => $value) {
$id = $value[0]->id;
$redirect_url = $value[0]->redirect_url; }
Not surprisingly, it only repeats the first value of these variables, but no matter what I try, I cannot miss it:
$value->redirect_url;
$value=>redirect_url;
I would appreciate any help.
source
share