View Single Post

  #5 (permalink)  
Old 10-17-2006
Jerry Stuckle
 
Posts: n/a
Default Re: warning: rewind() supplied argument is not a valid stream resourcein...

gp wrote:
> i am implementing Iterator in a class, I have pretty much copied the
> code from php.net on Object Iteration. Adding all the normal methods
> for the task...rewind, current, next, etc.
>
> I was attempting to add a seek method but am stymied by the above
> warnin, as well getting a seek on index 0 (zero) to work.
>


<code snipped>

rewind() is for files. I think you're looking for reset().

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote