Jump to content

No Dupes


shage

Recommended Posts

Is there a way to make this check for dupes before posting out??

 

function RandomLine($file, $amount) {
    for ( $counter = 1; $counter <= $amount; $counter += 1) {
	srand ((double)microtime()*1000000);
	$f_contents = file("".$file."");
	$line = $f_contents[array_rand($f_contents)];
if ($counter==$amount)
  print $line;
else
  print $line.', ';
}
}

$here = rand(4,10);

 

 

thank you

Link to comment
https://forums.phpfreaks.com/topic/207562-no-dupes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.