|
PHP5中文手册
DOMNodelist->item()(No version information available, might be only in CVS) DOMNodelist->item() — Retrieves a node specified by index 说明DOMNodeList
DOMNode item
( int $index
)
Retrieves a node specified by index within the DOMNodeList object. Tip
If you need to know the number of nodes in the collection, use the length property of the DOMNodeList object. 参数
返回值The node at the index th position in the DOMNodeList, or NULL if that is not a valid index. 范例
Example#1 Traversing all the entries of the table
<?php Alternatively, you can use foreach, which is a much more convenient way:
<?php 上例将输出:
|