JSONクエリで特定のオブジェクトを選択しようとしています。私はそれをデコードしました、そして私は答えを探すのに数時間を費やしましたが、私はこの特定のケースのために答えを決定することができません。ブログの応答からURLを選択したいのですが、配列を通り抜けることができません。
$oauth->fetch("http://api.tumblr.com/v2/user/info");
$json = json_decode($oauth->getLastResponse());
$url = $json->response->user->blogs;
$url1 = array($url->url); //This line doesn't give me the URL- I'm getting Array ( [0] => )
print_r($url1);
配列部分がない場合の出力は次のようになります。
Array ( [0] => stdClass Object ( [name] => 12748784 [url] => http://12748784.tumblr.com/ [followers] => 0 [primary] => 1 [title] => Untitled [description] => [admin] => 1 [updated] => 1341883193 [posts] => 1 [drafts] => 0 [messages] => 4 [queue] => 0 [ask] => 1 [ask_anon] => [tweet] => N [facebook] => N [facebook_opengraph_enabled] => N [type] => public ) ) ) ) )
あなたが私に与えることができるどんな助けにも感謝します。私は検索に疲れ果てています。