Well, I got what I wanted very nicely. Ended up using shuffle and array_chunk to randomize the results and divide them appropriately. And now for something completely different...
Not really.
So, to fully explain what I'm doing, say I have a list of 20 names and I have them in an array in a nicely randomized order, ready for display on a page. I want to show only 5 names at any one time, so the first page would display names 1 - 5 of 20 total names. The second page would show names 6 - 10, and so on through page 4.
I'm using shuffle to randomize the names, and then using array_chunk to break them up into 4 arrays of 5 names each. Displaying the first 5 names on the first page is easy enough, but what I'm trying to decide is how best to tackle displaying the second, third and fourth arrays on the subsequent pages. Basically, I'm thinking I need to store the arrays temporarily so I can use them on the additional pages. I'm trying to avoid using the database or any temp files and I'm thinking that I can do it with session variables.
Any comments or suggestions?