children



PHP children() 函数

定义和用法

children() 函数获取指定节点的子节点。

语法

class SimpleXMLElement
{
string children(ns,is_prefix)
}

参数 描述
ns 可选。
is_prefix 可选。默认是 false。

例子

XML 文件:



George
John
Reminder
Dont forget the meeting!

PHP 代码:

children() as $child)
  {
  echo "Child node: " . $child;
  }
?>

输出类似:

Child node: George
Child node: John
Child node: Reminder
Child node: Dont forget the meeting!

温馨提示: 本文最后更新于2024-12-31 20:04:15,某些文章具有时效性,若有错误或已失效,请在下方 留言或联系 蚂蚁官方
© 版权声明
THE END
喜欢就支持一下吧
点赞5赞赏 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容