title: How to loop through objects in php
body: <p>I am not too familiar with objects, i usually convert them to arrays using a script, but i thought it was time to man up and learn this, so i am asking how can i loop through an array of objects and pull out the specific information i need, the example of what is being returned is below.</p>
  
  <pre><code>[2] =&gt; stdClass Object
          (
              [id_str] =&gt; 152240682071900161
              [in_reply_to_status_id] =&gt; 
              [contributors] =&gt; 
              [place] =&gt; 
              [truncated] =&gt; 
              [geo] =&gt; 
              [favorited] =&gt; 
              [created_at] =&gt; Thu Dec 29 04:13:01 +0000 2011
              [user] =&gt; stdClass Object
                  (
                      [id_str] =&gt; 71876190
                      [contributors_enabled] =&gt; 
                      [lang] =&gt; en
                      [protected] =&gt; 
                      [url] =&gt; http://www.imdb.com/name/nm0000362/
                      [default_profile] =&gt; 1
                      [profile_use_background_image] =&gt; 1
                      [name] =&gt; Danny DeVito
                      [default_profile_image] =&gt; 
                      [friends_count] =&gt; 14
                      [profile_text_color] =&gt; 333333
                      [statuses_count] =&gt; 5361
                      [profile_background_image_url] =&gt; http://a0.twimg.com/images/themes/theme1/bg.png
                      [utc_offset] =&gt; -28800
                      [description] =&gt; I'm an actor, director and producer. 
                      [is_translator] =&gt; 
                      [created_at] =&gt; Sat Sep 05 19:44:48 +0000 2009
                      [profile_link_color] =&gt; 0084B4
                      [following] =&gt; 1
                      [profile_background_image_url_https] =&gt; https://si0.twimg.com/images/themes/theme1/bg.png
                      [favourites_count] =&gt; 8
                      [follow_request_sent] =&gt; 
                      [geo_enabled] =&gt; 1
                      [profile_background_color] =&gt; C0DEED
                      [profile_background_tile] =&gt; 
                      [followers_count] =&gt; 1784732
                      [profile_image_url] =&gt; http://a2.twimg.com/profile_images/400232403/Photo_6_normal.jpg
                      [screen_name] =&gt; DannyDeVito
                      [show_all_inline_media] =&gt; 
                      [profile_sidebar_fill_color] =&gt; DDEEF6
                      [profile_image_url_https] =&gt; https://si0.twimg.com/profile_images/400232403/Photo_6_normal.jpg
                      [listed_count] =&gt; 20918
                      [notifications] =&gt; 
                      [location] =&gt; Los Angeles
                      [id] =&gt; 71876190
                      [verified] =&gt; 1
                      [time_zone] =&gt; Pacific Time (US &amp; Canada)
                      [profile_sidebar_border_color] =&gt; C0DEED
                  )
  
              [in_reply_to_user_id] =&gt; 
              [retweet_count] =&gt; 10
              [in_reply_to_screen_name] =&gt; 
              [in_reply_to_status_id_str] =&gt; 
              [possibly_sensitive] =&gt; 
              [retweeted] =&gt; 
              [source] =&gt; WhoSay
              [in_reply_to_user_id_str] =&gt; 
              [coordinates] =&gt; 
              [id] =&gt; 1.52240682072E+17
              [text] =&gt; #Trollfoot Maroma http://t.co/4MvCYIFe
          )
  
      [3] =&gt; stdClass Object
          (
              [id_str] =&gt; 152240419344879616
              [in_reply_to_status_id] =&gt; 
              [contributors] =&gt; 
              [place] =&gt; 
              [truncated] =&gt; 
              [geo] =&gt; 
              [favorited] =&gt; 
              [created_at] =&gt; Thu Dec 29 04:11:59 +0000 2011
              [user] =&gt; stdClass Object
                  (
                      [id_str] =&gt; 71876190
                      [default_profile] =&gt; 1
                      [contributors_enabled] =&gt; 
                      [lang] =&gt; en
                      [protected] =&gt; 
                      [url] =&gt; http://www.imdb.com/name/nm0000362/
                      [profile_use_background_image] =&gt; 1
                      [name] =&gt; Danny DeVito
                      [default_profile_image] =&gt; 
                      [friends_count] =&gt; 14
                      [profile_text_color] =&gt; 333333
                      [statuses_count] =&gt; 5361
                      [profile_background_image_url] =&gt; http://a0.twimg.com/images/themes/theme1/bg.png
                      [utc_offset] =&gt; -28800
                      [description] =&gt; I'm an actor, director and producer. 
                      [is_translator] =&gt; 
                      [created_at] =&gt; Sat Sep 05 19:44:48 +0000 2009
                      [profile_link_color] =&gt; 0084B4
                      [following] =&gt; 1
                      [profile_background_image_url_https] =&gt; https://si0.twimg.com/images/themes/theme1/bg.png
                      [favourites_count] =&gt; 8
                      [follow_request_sent] =&gt; 
                      [geo_enabled] =&gt; 1
                      [profile_background_color] =&gt; C0DEED
                      [profile_background_tile] =&gt; 
                      [followers_count] =&gt; 1784725
                      [profile_image_url] =&gt; http://a2.twimg.com/profile_images/400232403/Photo_6_normal.jpg
                      [screen_name] =&gt; DannyDeVito
                      [show_all_inline_media] =&gt; 
                      [profile_sidebar_fill_color] =&gt; DDEEF6
                      [profile_image_url_https] =&gt; https://si0.twimg.com/profile_images/400232403/Photo_6_normal.jpg
                      [listed_count] =&gt; 20918
                      [notifications] =&gt; 
                      [location] =&gt; Los Angeles
                      [id] =&gt; 71876190
                      [verified] =&gt; 1
                      [time_zone] =&gt; Pacific Time (US &amp; Canada)
                      [profile_sidebar_border_color] =&gt; C0DEED
                  )
  
              [in_reply_to_user_id] =&gt; 
              [retweet_count] =&gt; 15
              [in_reply_to_screen_name] =&gt; 
              [in_reply_to_status_id_str] =&gt; 
              [possibly_sensitive] =&gt; 
              [retweeted] =&gt; 
              [source] =&gt; WhoSay
              [in_reply_to_user_id_str] =&gt; 
              [coordinates] =&gt; 
              [id] =&gt; 1.52240419345E+17
              [text] =&gt; #Trolltoll Maroma http://t.co/Egv9syon
          )
  </code></pre>