I have an multiple array ($result) which has objects in it. The array was returned from a function (made by someone I can't communicate now).
When I test the array with print_r($result[0]), it turns out to have embedded objects.
ABC Object (
[p1] => P1 Object (
[p1-1] => P1_property1
[p1-2] => P1_property2
[p1-3] => P1_property3
)
[p2] => ABC_property2
[p3] => ABC_property3
[p4] => ABC_property4
)
How can I fetch the Strings "P1_property1" to "P1_property3" and "ABC_property2" to "ABC_property4"?
I'm new to PHP, waiting for help!
$result[0]['p1']['p1-1']?$result[0]->p1->{'p1-1'}$result[0]::p1::p1-1, and why the brackets around p1-1?::is used for, it's forstaticproperties. The brackets are because->p1->p1-1would be a problem because of the'-'.