Hi everyone! I know how to use an array to rotate items, but I need to do something slightly more complicated: What I want to do is rotate the top row with the bottom row when the page is refreshed. I think I can do it with seperate arrays, but I'm not sure how to set it up. The only way I now how to set up an array is this: <?php $links = array(’http://www.link1.com’,'http://www.link2.com’); $link = $links[array_rand($links)]; echo “<meta http-equiv=’refresh’ content=’0;url=$link’/>â€; ?> PHP: How would I change this so that it would flip the table contents back and forth? Thanks!
did you mean like this <?php $myarray = array( array('offer pic 1','offer 1'), array('offer pic 2','offer 2'), array('offer pic 3','offer 3'), array('offer pic 4','offer 4'), array('offer pic 5','offer 5') ); shuffle($myarray); print_r($myarray); ?> Code (markup):