help with accessing an array/object
Posted
by noname
on Stack Overflow
See other posts from Stack Overflow
or by noname
Published on 2010-03-14T05:23:38Z
Indexed on
2010/03/14
5:35 UTC
Read the original article
Hit count: 186
php
i have printed out the contents of an array/object (named 'document') with print_r. it looks like this:
Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [id] => 7006276 ) [name] => Arnessysla [type] => region [latitude] => 64.5833 [longitude] => -21.8833 [entities] => SimpleXMLElement Object ( ) ) )
how do i get the 'entities' contents?
i've tried this: $document[0]->attributes['entities']
but it didnt work!
© Stack Overflow or respective owner