Firstly sorry If I didn't write the title correct because I really cant explain it that good.
Okay so I'm making a twitter app and I used this code
if(!empty($_SESSION['username'])){
$twitteroauth = new TwitterOAuth('MY PRIVATE CODE', 'MY PRIVATE CODE', $_SESSION['oauth_token'], $_SESSION['oauth_secret']);
}
$home_timeline = $twitteroauth->get('/statuses/user_timeline');
print_r($home_timeline);
I connected it with my twitter account and this isn't the full code, part of it. So this echos.
Array ( [0] => stdClass Object ( [created_at] => Wed Oct 10 19:27:42 +0000 2012 [id] => 256113796215603202 [id_str] => 256113796215603202 [text] => Testing a few thing on my twitter app. ) )
And it prints a few other stuff in the array but I cut it. How do I get the value of the text from the array text? Where it says [text] I would like to have the value of it?
I've spent atleast 30 minutes searching and I couldn't find the answer. If it is a simple function already made by php then can you please tell me. If it is a long line of code can you tell me.
echo $home_timeline[0]->text