Re: warning: rewind() supplied argument is not a valid stream resource in...
- From: "Tim Hunt" <tim.n.hunt@xxxxxxxxx>
- Date: 17 Oct 2006 08:28:07 -0700
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.
public function rewind() {
$cktl = rewind($this->cktl);
return $cktl;
}
You need to use reset($this->cktl) not rewind($this->cktl), the rewind
function is different to the rewind method of an iterator as it does
not work on arrays and it resets the pointer position of a file handle.
.
- Follow-Ups:
- References:
- Prev by Date: Problem with mod_rewrite and replacing spaces in URL
- Next by Date: Re: serious problem need help.
- Previous by thread: warning: rewind() supplied argument is not a valid stream resource in...
- Next by thread: Re: warning: rewind() supplied argument is not a valid stream resource in...
- Index(es):
Relevant Pages
|