Skip to content
Thomas Weinert edited this page Jul 29, 2014 · 2 revisions

FluentDOM\Nodes Countable

FluentDOM\Nodes implements the Countable interface.

$fd = new FluentDOM\Nodes(
  '<items><item/><item/><item/></items>'
);
echo count($fd->find('//item'));

Output:

3

See also: $length

Clone this wiki locally