Hi I wrote up a simple random generation script quickly which works as intended, however as is common I have ran into a little problem, here's the code:
<?php
$blogs_array = array('<li><a href="url">site1</a></li>','<li><a href="url">site2</a></li>','<li><a href="url">site3</a></li>');
shuffle ($blogs_array);
?>
<?php
for ($i = 0; $i < 3; $i++)
{
echo "$blogs_array[$i]";
}
?>
I've replaced the array urls with just url for privacy.
My problem is that with the script running, the same link can appear twice, is there a way to prevent an entry from appearing more than once?