开发者

json call from php twitter api

$content = $connection->get('statuses/public_timeline');

. When I use this fragment in my php file. I would like to echo $content[0].text from result array that shown below:

Array
(
[0] => stdClass Object
    (
        [in_reply_to_user_id_str] => 
        [coordinates] => 
        [geo] => 
        [user] => stdClass Object
            (
                [profile_sidebar_border_color] => a166d9
                [followers_count] => 40开发者_运维技巧
                ...
            )

        [truncated] => 
        [text] => some dump text
        ...
    )
...
 )

How will I access [text] or [profile_sidebar_border_color]. What is the PHP syntax? Should I decode?


You want

$content[0]->text 

for the text and

$content[0]->user->profile_sidebar_border_color

For the user's profile sidebar border color

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜