Parse object multidimensional array
How can I parse an object that contains an array of other object in php?
I’ve got this object as $result:
object(stdClass)#3 (4) {
["Ciccio"]=>
object(stdClass)#578 (2) {
["squadra"]=>
array(1) {
[0]=>
string(3) "Verona"
}
["membri"]=>
int(100)
}
["Mario"]=>
object(stdClass)#579 (2) {
["squadra"]=>
array(1) {
[0]=>
string(11) "Milan"
}
["membri"]=>
int(100)
}
["Pluto"]=>
object(stdClass)#580 (2) {
["squadra"]=>
array(1) {
[0]=>
string(9) "Inter"
}
["membri"]=>
int(100)
}
}
How can I parse with a foreach? I’ve tried with
foreach($result as $key){
var_dump($key);
}
but with no luck….
Total Views: 3 Today Views: 0















