dtnwm4807 2012-05-30 20:08
浏览 55

简单的xml php数组通配符

Can you advise what the array wildcard is for simple xml in php. I am wanting to get a wildcard response from the second part of the array. It will only work when the error is populated with a number, what is the wildcard so it will bring back all errors in the stuff array 0.

Example

$xml->Test->Account->Information->Stuff[0]->Next->Next->Error[]['Duration'];
  • 写回答

1条回答 默认 最新

  • dongtao9158 2012-05-30 20:25
    关注

    something like

    $results = array();
    foreach ($xml->Test->Account->Information->Stuff[0]->Next->Next->Error as $error) {
        $results[] = $error['Duration'];
    }
    
    评论

报告相同问题?

悬赏问题

  • ¥15 关于无人驾驶的航向角
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退