What's the best way to list each element in an array without popping them (in PHP)?
<p>I'm making a call to a PHP script that returns a random element from an array using array_rand(). It echos out some text that I'm ajaxing into another page. I'd like to have it echo out each successive element each time I load the page. So basically, I'm trying to figure out a way to echo out the first element when I load the page once, then the second element when I refresh, and so on. The thought maybe there would be a way to do it with array_pop(), but it removes each element, and I want to keep the array intact. </p>
