Reply to Re: warning: rewind() supplied argument is not a valid stream resource in...

Your name:

Reply:


Posted by gp on 10/17/06 16:03

aaaaarrrrrg..... i think i rewrote that function incorrectly...after
going back thank you for pointing that out for me :-D
i'll give it a whack
gp
On Oct 17, 11:28 am, "Tim Hunt" <tim.n.h...@gmail.com> wrote:
> 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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация