Two ways.
One, if its sorted in a db compare the new random number to that stored, same, get another, different, add it.
Two, just generate the list.
Well, save the random number to a variable like, using the code JbA gave us...
<?php
srand ((double)microtime()1000000);
$foo1 = range(1,13);
shuffle($some_array);
for ($i = 1; $i <= 5; $i++) {
print $foo1[$i];
echo "<br>";
}
srand ((double)microtime()1000000);
$foo2 = range(1,13);
shuffle($some_array);
for ($i = 1; $i <= 5; $i++) {
print $foo2[$i];
echo "<br>";
}
if $foo2 == '$foo1' {unset $foo2; srand ((double)microtime()*1000000);
$foo2 = range(1,13);
shuffle($some_array);
for ($i = 1; $i <= 5; $i++) {
print $foo2[$i];
echo "<br>";
}
}
?>
Something like that should work, I'm a bit rusty on some of the unset stuff and I'm almost positive it can be done via a while loop, not sure how atm though.
Hope that helps in some form, I gotta sleep.