Re: [Phplib-users] how to save array pointer with phplib
Brought to you by:
nhruby,
richardarcher
From: Marko K. <Mar...@mc...> - 2002-02-11 09:39:45
|
Hi Nathan, > makes a new array with the name found in persistent_slot and then re-adds > the serailized data to it. Well, that's what lets it forget the current position in the array. > Your method of saving the pointer postion is what you need to do. That's what I did. > I don't think that you can actually "save" a pointer, so you may want > to find the current location in the array, determinie it's index > number and save that. Well, I did this by reimplementing the next(), prev(), current(), end() and reset() methods of an array within my class, since I didn't see a method in php's array-functions which would return the current pointer position inside the array. That's a lot of overhead in my class now, but at least it works. > I think this would be a good feature to have for phplib to do > transparently, please file a SF Feature Requiest for it adn we'll try to > get it in to a future release. I'll do that. Greetings and thanks, Nathan, for replying! Bye, Marko |