PHP random number generation

Time:2021-5-9
/*** random number generation * // / total number of numbers $num = 30// The number of rows is $rownum = 6$ arr = range(1, $num); shuffle($arr);$ i = 0; foreach ($arr as $val) {    $i++;     echo $val;     if ($i >= $rowNum) {        $i = 0;         echo PHP_ EOL;    }  else {        echo ' ';    }} die;