dor*_*emi 6 php arrays oop simplexml
我有这个SimpleXML对象:
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"
}
}
}
Run Code Online (Sandbox Code Playgroud)
为什么is_array($ object-> record)返回false?它清楚地说它是一个阵列.为什么我不能使用is_array检测它?
此外,我无法使用(数组)$ object-> record将其强制转换为数组.我收到此错误:
警告:尚无法为属性分配复杂类型
| 归档时间: |
|
| 查看次数: |
1546 次 |
| 最近记录: |