双色球

简单的程序:

<?php
//双色球实例
$balls = range(1,33);
$redBallsIndex = array_rand($balls, 6);
$blueBall = mt_rand(1,16);

echo 'Red ball:';

foreach ($redBallsIndex as $index) {
    echo $balls[$index] . ' ';
}

echo '<br />Red ball:' . $blueBall;
原文地址:https://www.cnblogs.com/xingmeng/p/3457490.html