Hi:
Could someone tell me how to make a random selection , from a preset amout of numbers or IDs?
For example: I have number 3, 99, 624 I want to select one randomly.
Or I have ID1, ID25, ID77 , and I need to select one randomly.
Thanx Kamy
<? $id[] = 3; $id[] = 99; $id[] = 624; srand ((double)microtime()*1000000); $randval = rand(0,count($id)-1); print "RandomId1# is $id[$randval]<br>\n"; ?>
<? $id[] = "ID1"; $id[] = "ID25"; $id[] = "ID77"; srand ((double)microtime()*1000000); $randval = rand(0,count($id)-1); print "RandomId2# is $id[$randval]<br>\n"; ?>