我需要从此机箱中提取图像URL。我怎样才能访问它?
["enclosure"]=> object(SimpleXMLElement) {
["@attributes"]=> array(3) {
["url"]=> string(81) "http://image.jpg"
["length"]=> string(4) "5000"
["type"]=> string(10) "image/jpeg"
}
}
答案 0 :(得分:5)
$url = (string) $var['enclosure']->attributes()->url;