numbers=range(1,30);//播下随机数发生器种子,可有可无,测试后对结果没有影响srand((float)microtime()∗10000);shuffle(numbers);
unset(numbers[0]);arr=arrayrand(numbers,1);
echo arr;
unset(numbers[0]);arr=arrayrand(numbers,1);
echo arr;
转载请注明:XAMPP中文组官网 » php 随机数
转载请注明:XAMPP中文组官网 » php 随机数