This question already has an answer here:
I use this code to get many information about the a tweet
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET);
$tw_get=$connection->get('statuses/user_timeline', array('screen_name' => $tw_usr, 'count' => 1));
how can I print the array to be like this example :
[id_str] => xxxxxxxxxxxxxxxxxx
[created_at] => Thu May 10 14:08:36 +0000 2012
[recipient_screen_name] => Infobot2012
[recipient_id] => xxxxxxxx
[sender_id] => xxxxxxxx
[recipient] => stdClass Object
(
[id] => xxxxxxxx
[id_str] => xxxxxxxx
[default_profile] => 1
[profile_use_background_image] => 1
[location] =>
[statuses_count] => 11
[following] =>
[utc_offset] =>
[profile_sidebar_border_color] => C0DEED
[listed_count] => 0
)
[text] => test
)
because it's printed like this :
stdClass Object ( [created_at] => Fri Sep 01 16:10:42 +0000 2017 [id] => 9.0365133846191E+17 [id_str] => 903651338461908997 [text] => RT @SonyMobileNews: Engadget hands-on with Xperia XZ1 - includes 3D Creator, Predictive Capture and more youtube.com [truncated] => [entities] => stdClass Object ( [hashtags] => Array ( ) [symbols] => Array ( ) [user_mentions] => Array ( [0] => stdClass Object ( [screen_name] => SonyMobileNews [name] => Sony Xperia News [id] => 70888891 [id_str] => 70888891 [indices] => Array ( [0] => 3 [1] => 18 ) ) ) [urls] => Array ( [0] => stdClass Object ( [url] => youtube.com [expanded_url] => https://www.youtube.com/watch?v=KIOBponXMkY [display_url] => youtube.com/watch?v=KIOBpo… [indices] => Array ( [0] => 105 [1] => 128 ) ) ) )
</div>