• 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    PHP attributes()函数讲解

    PHP attributes() 函数

    实例

    返回 XML 的 body 元素的属性和值:

    ?php 
    $note=XML
    note> 
    to>Tove/to> 
    from>Jani/from> 
    heading>Reminder/heading> 
    body date="2013-01-01" type="private">Don't forget me this weekend!/body> 
    /note> 
    XML;
    $xml=simplexml_load_string($note); 
    foreach($xml->body[0]->attributes() as $a => $b) 
    { 
    echo $a,'="',$b,""br>"; 
    } 
    ?>

    定义和用法

    attributes()函数返回 XML 标签的属性和值。

    语法

    attributes( _ns,is_prefix_ );

    总结

    以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,谢谢大家对脚本之家的支持。如果你想了解更多相关内容请查看下面相关链接

    您可能感兴趣的文章:
    • spring学习之@SessionAttributes实例解析
    • jQuery Attributes(属性)的使用(二、类篇)
    • jQuery Attributes(属性)的使用(一、属性篇)
    • 使CheckBoxList的Attributes属性生效(修改微软的一个bug)
    • VBS教程:属性-Attributes 属性
    • 浅谈js中的attributes和Attribute的用法与区别
    上一篇:PHP asXML()函数讲解
    下一篇:PHP children()函数讲解
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯 版权所有

    《增值电信业务经营许可证》 苏ICP备15040257号-8

    PHP attributes()函数讲解 PHP,attributes,函数,讲解,PHP,