26561

Question:
When I try to access info that is not presented in xml like so: $someInfo = $element->blabla->cats[0]->src; PHP shows notice like this: Notice: Trying to get property of non-object How would I settle the matter?
Answer1:Just check if the specific element is set befor accessing data:
if(isset($element->blabla->cats[0]->src)){
$someInfo = $element->blabla->cats[0]->src;
}