我有这个SimpleXML的对象:为什么is_array()返回false?
object(SimpleXMLElement)#176 (1) {
["record"]=>
array(2) {
[0]=>
object(SimpleXMLElement)#39 (2) {
["f"]=>
array(2) {
[0]=>
string(13) "stuff"
[1]=>
string(1) "1"
}
}
[1]=>
object(SimpleXMLElement)#37 (2) {
["f"]=>
array(2) {
[0]=>
string(13) "more stuff"
[1]=>
string(3) "90"
}
}
}
为什么is_array($对象 - >记录)返回false?它清楚地表明它是一个数组。为什么我无法使用is_array检测它?
另外,我无法使用(array)$ object-> record将其转换为数组。我得到这个错误:
Warning: It is not yet possible to assign complex types to properties
永远不要相信'的var_dump()`或。 – 2010-12-01 02:06:55