Jump to content

Help!Generating random number without the generated numbers already ??


jigen7

Recommended Posts

can anyone hep me me make a function that return random numbers but it will not generate another random number if he already pass the value  for example it  return 2, so after i call the function random again it will not return another 2 i want another numbers to be returned instead ?? can anyone help me here?

 

function random($max){

srand ((double) microtime( )*1000000);

$random_number = rand(0,$max);

return $random_number;

}

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.