I’m totally lost on this one. I’m receiving the following from a twitter API:
[code=php]stdClass Object
(
[0] => SimpleXMLElement Object
(
[created_at] => Wed Nov 05 13:19:41 +0000 2008
[id] => 991616764
[text] => This is my current twitter status
[source] => Twinkle
[truncated] => false
[in_reply_to_status_id] => SimpleXMLElement Object
(
)
[in_reply_to_user_id] => SimpleXMLElement Object
(
)
[favorited] => false
[user] => SimpleXMLElement Object
(
[id] => 12008842
[name] => Justin Schroeder
[screen_name] => jpschroeder
[location] => iPhone: 39.279629,-94.580763
[description] => Pilot/Web Designer
[profile_image_url] => http://s3.amazonaws.com/twitter_production/profile_images/56667821/twitter_me_normal.jpg
[url] => http://www.jpschroeder.com
[protected] => false
[followers_count] => 12
)
)
)
I have tried everything to access these variables. I’m sure I’m just missing something really easy. I’ve tried these things:
[code=php]
$message->0->text
$message->’0′->text
$num = 0;
$message->$num->text
object_to_array($message) //this returns nothing at all!!
print($message->xpath(“//text”));
please help if you can! thanks.