PHP随机产生10个100以内互不相同的正整数按从小到大的顺序输出

<?php

//产生1~100的正整数
$numbers = range(1,100);

//从1~100中选出10个不重复的整数,并使用函数进行排序
$randNumbers = array_rand($numers,10);

print_r($randNumbers);

  

let the world have no hard-to-write code ^-^
原文地址:https://www.cnblogs.com/ovim/p/11338850.html