mmmm

http://it.php.net/mt_rand

prova a lanciare mt_srand prima della seconda esecuzione

anche se a me proccupa un altra cosa...che non credo possa ritornare valori negativi

da uno dei commenti......

Warning! Some times in windows platform (2000 and XP) mt_rand generates the same number. It happens to me in 3 machines (1xW2000 and 2xWXP) and in another two XP doesnt happens.

PHP Version: 4.3.4
All XP machines with SP2 and all 2000 machines with SP1.

I have to use a mt_srand function to correct this issue.

Hope this help someone.