【发布时间】:2014-08-24 06:21:54
【问题描述】:
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字符串,如果有人能帮忙就太好了
请帮忙
【问题讨论】: