php man page for limititerator

Query: limititerator

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

LIMITITERATOR(3)							 1							  LIMITITERATOR(3)

The LimitIterator class

INTRODUCTION
The LimitIterator class allows iteration over a limited subset of items in an Iterator.
CLASS SYNOPSIS
LimitIterator LimitIteratorextends IteratorIteratorOuterIterator Methods o public LimitIterator::__construct (Iterator $iterator, [int $offset], [int $count = -1]) o public mixed LimitIterator::current (void ) o public Iterator LimitIterator::getInnerIterator (void ) o public int LimitIterator::getPosition (void ) o public mixed LimitIterator::key (void ) o public void LimitIterator::next (void ) o public void LimitIterator::rewind (void ) o public int LimitIterator::seek (int $position) o public bool LimitIterator::valid (void )
EXAMPLES
Example #1 LimitIterator usage example <?php // Create an iterator to be limited $fruits = new ArrayIterator(array( 'apple', 'banana', 'cherry', 'damson', 'elderberry' )); // Loop over first three fruits only foreach (new LimitIterator($fruits, 0, 3) as $fruit) { var_dump($fruit); } echo " "; // Loop from third fruit until the end // Note: offset starts from zero for apple foreach (new LimitIterator($fruits, 2) as $fruit) { var_dump($fruit); } ?> The above example will output: string(5) "apple" string(6) "banana" string(6) "cherry" string(6) "cherry" string(6) "damson" string(10) "elderberry" PHP Documentation Group LIMITITERATOR(3)
Related Man Pages
simplexmliterator(3) - php
recursivecachingiterator(3) - php
limititerator(3) - php
multipleiterator(3) - php
spltempfileobject(3) - php
Similar Topics in the Unix Linux Community
shell script...help!!
Another question regarding yes
How to remove space in sed for / character
Getting Distinct values from second field in a file....
Unix: list out Pattern occurrence (count)