我有一个名为 $picasa_feed 的对象,如下所示:
SimpleXMLElement Object
(
[guid] => https://picasaweb.google.com/data/entry/base/user/0000000000000000/albumid/0000000000000000?alt=rss&hl=en_US
[pubDate] => Fri, 12 Dec 2008 20:00:00 +0000
[category] => http://schemas.google.com/photos/2007#album
[title] => My Pictures
[description] => ...
[link] => https://picasaweb.google.com/0000000000000000/MyAlbum
[author] => Me
)
我想将属性值放入关联数组的元素中:
$data_to_save['title'] = $picasa_feed->title;
当我这样做时, $data_to_save 的值是
Array
(
[title] => SimpleXMLElement Object
(
[0] => My Pictures
)
}
我想要的是
Array
(
[title] => My Pictures
}
我做错了什么,我该如何解决?