iterator_count

(PHP 5 >= 5.1.0)

iterator_countCount the elements in an iterator

Descrizione

int iterator_count ( Traversable $iterator )

Count the elements in an iterator.

Elenco dei parametri

iterator

The iterator being counted.

Valori restituiti

The number of elements in iterator.

Esempi

Example #1 iterator_count() example

<?php
$iterator 
= new ArrayIterator(array('recipe'=>'pancakes''egg''milk''flour'));
var_dump(iterator_count($iterator));
?>

Il precedente esempio visualizzerĂ :

int(4)

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top