【发布时间】:2012-02-16 17:53:44
【问题描述】:
我有一个包含以下内容的变量 $foo:
object(SimpleXMLElement)#969 (2) {
["@attributes"]=>
array(1) {
["type"]=>
string(4) "html"
}
[0]=>
string(13) "Viernes Santo"
}
我正在尝试获取“Viernes Santo”的内容,但我不能……我尝试了$foo[0],但返回的内容相同……有什么想法吗?
【问题讨论】:
-
只需
echo $foo,请查看 PHP 手册中的示例
标签: php xml arrays xml-parsing