Hi,

I've written a picture rotation script, file paths are stored in a file and are called 
depending on a random number generator..

The problem is that out of 14 possible numbers only 7 are been generated.

the code I'm using is...

srand ( (double) microtime()*10000000); 

$numbertodisplay = rand(0, (($no_items)-1));

The variable $numbertodisplay only ever takes the values 0,2,4,6,8,10,12.

Is there a reason that the only numbers produced are even?

Thanks for any  help..

James



Reply via email to