显示json解码数组中的文本


Display text from a json decoded array

  Array
(
    [statuses] => Array
        (
            [0] => Array
                (
                    [metadata] => Array
                        (
                            [result_type] => recent
                            [iso_language_code] => en
                        )
                    [created_at] => Thu Jul 03 08:06:24 +0000 2014
                    [id] => 484609084809687043
                    [id_str] => 484609084809687043
                    [text] => RT @RashtrapatiBhvn: #Rains at the #RashtrapatiBhavan http://t.co/w1imlVFbHe
                    [source] => Twitter Web Client
                    [truncated] => 
                    [in_reply_to_status_id] => 
                    [in_reply_to_status_id_str] => 
                    [in_reply_to_user_id] => 
                    [in_reply_to_user_id_str] => 
                    [in_reply_to_screen_name] => 
                    [user] => Array
                        (
                            [id] => 1620882618
                            [id_str] => 1620882618
                            [name] => HinduNationalist#HDL
                            [screen_name] => hinduwarrior15
                            [location] => HINDUSTAN
                            [description] => I want  India to become a exclusive  Hindurashtra. Want a HINDUSTAN by hindus for hindus and to hindus. HINDU NATIONALIST.. #HDL
                            [url] => http://t.co/hWAAfdlWMX
                            [entities] => Array
                                (
                                    [url] => Array
                                        (
                                            [urls] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [url] => http://t.co/hWAAfdlWMX
                                                            [expanded_url] => http://www.hdlindia.org/
                                                            [display_url] => hdlindia.org
                                                            [indices] => Array
                                                                (
                                                                    [0] => 0
                                                                    [1] => 22
                                                                )
                                                        )
                                                )
                                        )

这是我调用Twitter API得到的典型结果,但我只想从中显示id和文本。我已经使用json_decode方法解码了传入的json结果。

我从来没有使用过json字符串,如果有人可以帮助它将是伟大的

请帮

$yourArray['statuses'][0]['id']$yourArray['statuses'][0]['text']都可以。