Well, actually... I think I *may* have solved my first question.
Here's the code I'm using. It's a slightly modified version of one posted by users on php.net.
PHP Code:
function swapshuffle($testing) {
srand ((double) date("Ymd") * 10000000);
for ($i=0;$i<sizeof($testing);$i++) {
$from=rand(0,sizeof($testing)-1);
$old=$testing[$i];
$testing[$i]=$testing[$from];
$testing[$from]=$old;
}
return $testing;
}
Sure enough, this randomizes the array in such a way that it remains the same. Now I just have to make sure that it'll change when the day changes.
Bookmarks