this function takes random links out of a file, i am trying to figure out how to make the links not repeat itself.
sometimes it displays the same link twice.
function random_links($file, $display)
{
$filenaam = $file . '.txt';
$f = file($filenaam);
srand((double)microtime()*1000000);
for($c=0; $c<=$display; $c++)
{
$i = rand(0,count($f)-1);
list ($url, $desc) = split("\|", $f[$i]);
$desc = rtrim($desc);
echo '<a href="'.$url.'">'.$desc.'</a><br>';
}
}