downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

LimitIterator::current> <LimitIterator
[edit] Last updated: Fri, 24 Jun 2011

view this page in

LimitIterator::__construct

(PHP 5 >= 5.1.0)

LimitIterator::__constructساخت LimitIterator

Description

LimitIterator::__construct ( Iterator $iterator [, int $offset = 0 [, int $count = -1 ]] )

ساخت LimitIterator از iterator به همراه offset شروع داده شده و بیشترین count.

Parameters

iterator

Iterator برای جد.

offset

آفست اختیاری حد.

count

شمارش اختیاری حد.

Return Values

LimitIterator جدید.

Errors/Exceptions

ایجاد OutOfRangeException اگر offset کمتر از 0 باشد یا count کمتر از -1 بتشپ.

Examples

Example #1 مثال LimitIterator::__construct()

<?php
$ait 
= new ArrayIterator(array('a''b''c''d''e'));
$lit = new LimitIterator($ait13);
foreach (
$lit as $value) {
    echo 
$value "\n";
}
?>

The above example will output:

b
c
d



add a note add a note User Contributed Notes LimitIterator::__construct - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites