<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Seek to the given position</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="limititerator.rewind.html">LimitIterator::rewind</a></div> <div class="next" style="text-align: right; float: right;"><a href="limititerator.valid.html">LimitIterator::valid</a></div> <div class="up"><a href="class.limititerator.html">LimitIterator</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="limititerator.seek" class="refentry"> <div class="refnamediv"> <h1 class="refname">LimitIterator::seek</h1> <p class="verinfo">(PHP 5 >= 5.1.0)</p><p class="refpurpose"><span class="refname">LimitIterator::seek</span> — <span class="dc-title">Seek to the given position</span></p> </div> <div class="refsect1 description" id="refsect1-limititerator.seek-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">int</span> <span class="methodname"><strong>LimitIterator::seek</strong></span> ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$position</code></span> )</div> <p class="para rdfs-comment"> Moves the iterator to the offset specified by <em><code class="parameter">position</code></em>. </p> </div> <div class="refsect1 parameters" id="refsect1-limititerator.seek-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">position</code></em></span> <dd> <p class="para"> The position to seek to. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-limititerator.seek-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns the offset position after seeking. </p> </div> <div class="refsect1 errors" id="refsect1-limititerator.seek-errors"> <h3 class="title">Errors/Exceptions</h3> <p class="para"> Throws an <a href="class.outofboundsexception.html" class="classname">OutOfBoundsException</a> if the position is outside of the limits specified in <span class="methodname"><a href="limititerator.construct.html" class="methodname">LimitIterator::__construct()</a></span>. </p> </div> <div class="refsect1 seealso" id="refsect1-limititerator.seek-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="methodname"><a href="limititerator.current.html" class="methodname" rel="rdfs-seeAlso">LimitIterator::current()</a> - Get current element</span></li> <li class="member"> <span class="methodname"><a href="limititerator.key.html" class="methodname" rel="rdfs-seeAlso">LimitIterator::key()</a> - Get current key</span></li> <li class="member"> <span class="methodname"><a href="limititerator.rewind.html" class="methodname" rel="rdfs-seeAlso">LimitIterator::rewind()</a> - Rewind the iterator to the specified starting offset</span></li> <li class="member"> <span class="methodname"><a href="limititerator.next.html" class="methodname" rel="rdfs-seeAlso">LimitIterator::next()</a> - Move the iterator forward</span></li> <li class="member"> <span class="methodname"><a href="limititerator.valid.html" class="methodname" rel="rdfs-seeAlso">LimitIterator::valid()</a> - Check whether the current element is valid</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="limititerator.rewind.html">LimitIterator::rewind</a></div> <div class="next" style="text-align: right; float: right;"><a href="limititerator.valid.html">LimitIterator::valid</a></div> <div class="up"><a href="class.limititerator.html">LimitIterator</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>