0
object(stdClass)#1 (3) { ["status_code"]=> int(200) ["status_txt"]=> string(2) "OK" ["data"]=> 
object(stdClass)#2 (5) { ["long_url"]=> string(18) "http://google.com/" ["url"]=> string(21) "http://bit.ly/17A2GVj" ["hash"]=> string(7) "17A2GVj" ["global_hash"]=> string(6) "3j4ir4" ["new_hash"]=> int(0) } }

我如何循环这个?我正在尝试获取 ["hash"]

4

2 回答 2

1
foreach $objects as $object
{
   $result[] = $object['data']
}

var_dump($result);

于 2013-10-13T15:53:19.713 回答
0

$yourObjectVariable->data->hash

于 2013-10-13T15:54:12.473 回答