Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to access the response from statusesUserTimeline (twitter) using Zend ?
    primarykey
    data
    text
    <p>I'm new to PHP so it might be stupid question but I tried to figure it myself with no success. I am trying to get some information from Twitter using Zend Framework, this is the response:</p> <pre><code> [jsonBody:protected] =&gt; Array ( [0] =&gt; stdClass Object ( [created_at] =&gt; Sat Jun 15 08:30:00 +0000 2013 [id] =&gt; 3.4582047273635E+17 [id_str] =&gt; 345820472736354304 [text] =&gt; In Saturday Flashback, watch #FFC take a huge step towards the Premier League with a vital win at Blackburn in 2001. http://t.co/iRWPDg7NmK [source] =&gt; web [truncated] =&gt; [in_reply_to_status_id] =&gt; [in_reply_to_status_id_str] =&gt; [in_reply_to_user_id] =&gt; [in_reply_to_user_id_str] =&gt; [in_reply_to_screen_name] =&gt; [user] =&gt; stdClass Object ( [id] =&gt; 22903812 [id_str] =&gt; 22903812 [name] =&gt; Fulham Football Club [screen_name] =&gt; FulhamFC [location] =&gt; Fulham, London, England [description] =&gt; The Official Twitter page of Fulham Football Club, London, England. http://t.co/GWMBbvhEfT #ffc #fulhamfc #coyw #bytheriver [url] =&gt; http://t.co/qHWTVnXr2E [entities] =&gt; stdClass Object ( [url] =&gt; stdClass Object ( [urls] =&gt; Array ( [0] =&gt; stdClass Object ( [url] =&gt; http://t.co/qHWTVnXr2E [expanded_url] =&gt; http://www.fulhamfc.com [display_url] =&gt; fulhamfc.com [indices] =&gt; Array ( [0] =&gt; 0 [1] =&gt; 22 ) ) ) ) [description] =&gt; stdClass Object ( [urls] =&gt; Array ( [0] =&gt; stdClass Object ( [url] =&gt; http://t.co/GWMBbvhEfT [expanded_url] =&gt; http://fulhamfc.com [display_url] =&gt; fulhamfc.com [indices] =&gt; Array ( [0] =&gt; 68 [1] =&gt; 90 ) ) ) ) ) [protected] =&gt; [followers_count] =&gt; 139667 [friends_count] =&gt; 12662 [listed_count] =&gt; 2083 [created_at] =&gt; Thu Mar 05 10:10:44 +0000 2009 [favourites_count] =&gt; 16 [utc_offset] =&gt; 0 [time_zone] =&gt; London [geo_enabled] =&gt; [verified] =&gt; 1 [statuses_count] =&gt; 11680 [lang] =&gt; en [contributors_enabled] =&gt; [is_translator] =&gt; [profile_background_color] =&gt; 000000 [profile_background_image_url] =&gt; http://a0.twimg.com/profile_background_images/837307227/ac1a6a4096d1b8cda9276d169b57b889.jpeg [profile_background_image_url_https] =&gt; https://si0.twimg.com/profile_background_images/837307227/ac1a6a4096d1b8cda9276d169b57b889.jpeg [profile_background_tile] =&gt; [profile_image_url] =&gt; http://a0.twimg.com/profile_images/3178979663/5ef1b3abec0dec9e160491cb62c835f5_normal.jpeg [profile_image_url_https] =&gt; https://si0.twimg.com/profile_images/3178979663/5ef1b3abec0dec9e160491cb62c835f5_normal.jpeg [profile_banner_url] =&gt; https://pbs.twimg.com/profile_banners/22903812/1348050191 [profile_link_color] =&gt; 0084B4 [profile_sidebar_border_color] =&gt; FFFFFF [profile_sidebar_fill_color] =&gt; DDEEF6 [profile_text_color] =&gt; 333333 [profile_use_background_image] =&gt; 1 [default_profile] =&gt; [default_profile_image] =&gt; [following] =&gt; [follow_request_sent] =&gt; [notifications] =&gt; ) [geo] =&gt; [coordinates] =&gt; [place] =&gt; [contributors] =&gt; [retweet_count] =&gt; 9 [favorite_count] =&gt; 5 [entities] =&gt; stdClass Object ( [hashtags] =&gt; Array ( [0] =&gt; stdClass Object ( [text] =&gt; FFC [indices] =&gt; Array ( [0] =&gt; 29 [1] =&gt; 33 ) ) ) [symbols] =&gt; Array ( ) [urls] =&gt; Array ( [0] =&gt; stdClass Object ( [url] =&gt; http://t.co/iRWPDg7NmK [expanded_url] =&gt; http://ow.ly/m3Ljl [display_url] =&gt; ow.ly/m3Ljl [indices] =&gt; Array ( [0] =&gt; 117 [1] =&gt; 139 ) ) ) [user_mentions] =&gt; Array ( ) ) [favorited] =&gt; [retweeted] =&gt; [possibly_sensitive] =&gt; [lang] =&gt; en ) ) </code></pre> <p>I didn't find a way to access the data, casting the object to array didn't work, access directly as an object also didn't work. Please Advise.</p> <p>e.g:</p> <pre><code>echo $response['0']['text']; echo $response-&gt;0-&gt;text; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload