<?php
header("Content-Type:text/html;charset=utf-8");
$red=range(1,33);
$blue=mt_rand(1,6);
$red1=array_rand($red,6);
//"红色球";
echo "<div style=background-color:red;color:white;width:160px;float:left;text-align:center>";
foreach($red1 as $v){
echo " ".$v;
}
echo "</div>";
//"蓝色球";
echo "<div style=background-color:blue;color:white;width:160px;float:left;text-align:center>";
echo $blue;
echo "</div>";
?>
运行结果