我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Zend_Dom_Query元素计数的起始数是多少?

I have just begun using Zend_Dome_Query and although this seems like a basic question to ask it can be too easy to asume the answer. I was wondering if the start counts for elements within a DOM starts at [0] or [1]. So for example:

$dom->queryXpath('//div[@id="foo"]/span[1]');

Would this select the first span element or the second? Thank you in advance.

Indexes (positions) are 1 based.

so /span[1] is the first child.

Hope it helps

近期文章

  • too long
  • 用于存储求职者信息的数据库设计
  • PHP下拉列表没有生成
  • 使用PHP从MySQL中选择并回显单个字段
  • 哪个PHP版本可以让你无需将INI文件复制到每个目录?
  • too long
  • 在基本控制器中使用phalcon类,而不是在单个控制器上使用
  • 设置Web服务器的权限以访问app / storage中的文件夹作为写入
  • too long
  • fetchAll()返回值为0的数组(PDO)
  • Codeigniter - 在库中加载库类
  • too long
  • 如何更新然后在数据库中插入所有记录[关闭]
  • 如何在JQGrid视图中添加功能
  • too long
  • jquery datetimepicker addon am / pm - 所有pm字符串都在db中
  • imagefilter的半灰度()
  • 多维数组 - IP.Nexus(IPB)
  • 在选择选项标记中显示数据库中的选定选项
  • 一起使用ob_gzhandler和ob_clean时的PHP输出缓冲区问题

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华