php 随机数

$numbers = range (1,30);
//播下随机数发生器种子,无关紧要,测试后对结果没有影响
srand ((float)microtime()*10000);
shuffle ($numbers);
unset($numbers[0]);
arr=array_rand($numbers,1);
echo arr;测试

相关文章
相关标签/搜索