I need to iterate through an array, starting with the first element, in chunks of, say, 5, then break off and do something else with the array, then go back to where I left off.
I'm confused about how the array counter, using next, or current etc. would work. How can I reset the current counter to be where it was before it was potentially messed about with some other operation?
I'm not sure if I've explained that well. So, say I want to start at an element of an array that isn't the beginning, (with a stored key) then iterate through the next five elements, then store where I got to for the next time. Does that make sense? The array in question doesn't use incremental numbers [1,2,3] as keys, by the way, it's more random than that.
Hope someone understands what I'm trying to do and can give me a few pointers. All the examples I've managed to find are for iterating complete arrays.