Get twitter entity value from json with PHP <p>I am looping through each tweet in json feed from twitter. The first part of the code works perfectly...</p> <pre><code>$screen_name = "BandQ"; $count = 10; $urlone = json_decode(file_get_contents("http://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&amp;include_rts=false&amp;screen_name=BandQ&amp;count=".$count."&amp;page=1"),true); $urltwo = json_decode(file_get_contents("http://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&amp;include_rts=false&amp;screen_name=BandQ&amp;count=".$count."&amp;page=2"),true); $data = array_merge_recursive( $urlone, $urltwo); // Output tweets //$json = file_get_contents("http://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&amp;include_rts=false&amp;screen_name=".$screen_name."&amp;count=".$count."", true); //$decode = json_decode($json, true); $count = count($data); //counting the number of status $arr = array(); for($i=0;$i&lt;$count;$i++){ $text = $data[$i]["text"]." "; $retweets = $data[$i]["text"]."&lt;br&gt;Retweet Count: ".$data[$i]["retweet_count"]. "&lt;br&gt;Favourited Count: ".$data[$i]["favorite_count"]."&lt;br&gt;".$data[$i]["entities"]["user_mentions"][0]["screen_name"]."&lt;br&gt;"; // $arr[] = $text; $arr[] = $retweets; } // Convert array to string $arr = implode(" ",$arr); print_r($arr); </code></pre> <p>but when I try to get entities->user_mentions->screen_name the PHP throws errors...</p> <pre><code>Notice: Array to string conversion in C:\xampp\htdocs\tweets.php on line 29 Notice: Use of undefined constant user_mentions - assumed 'user_mentions' in C:\xampp\htdocs\tweets.php on line 29 Notice: Use of undefined constant screen_name - assumed 'screen_name' in C:\xampp\htdocs\tweets.php on line 29 </code></pre> <p>How do I get that screen_name value?</p> <p>Many thanks</p>