It looks like array_chunk() or something based on it will be the way to accomplish the second method above.
http://us1.php.net/manual/en/function.array-chunk.php
If the second set of results is larger than the first, it will be cut up as well into pieces no larger than the first. So care will be required when using this. Also, the result might be an "iterable object" and not a "true array", in which case you would need to use a function described in the comments below it.
Bookmarks