It looks like it should be
$result->objects[0]->xml
Just remember when looking at print_r
or var_dump
results that any time you see Object (...)
that you will need to use ->
to access the property listed for that object.
So in this case, you have a base Object set as $result
, which you then need to get the objects
property from. That property contains an array. At index 0 of the array, is another Object, which is the Object where your xml
property resides.