我有这行代码:
print_r($item->figure->iframe);
产生这个输出:
SimpleXMLElement Object
(
[@attributes] => Array
(
[height] => 288
[mozallowfullscreen] => true
[src] => http://www.hulu.com/embed.html?eid=Bq_uuy5X4KWFpYZgwa9e9g
[allowfullscreen] => true
[width] => 512
[frameborder] => 0
[scrolling] => 0
[webkitAllowFullScreen] => true
)
)
然后我试试这个:
var_dump($item->figure->iframe->{'@attributes'}["src"]);
然后给了我这个:
NULL
我究竟做错了什么?我想拿src
东西,为什么拿不到?