PHP学习笔记之用php绘制表格示例
时间:2021-07-01 10:21:17
帮助过:4人阅读
用php绘制表格示例 define(MAX_NUM, 20);
$bc = "000000";
$color = array();
for ($i=0; $i<10000; $i++)
{
$color[$i] = "#" . $bc;
$bc += 0x00000f;
//echo($color[$i] . "\t");
}
echo "
";
?>
for ($i=1; $i<=MAX_NUM; $i++)
{
echo("");
for ($j=1; $j<=MAX_NUM; $j++)
{
$s = $i * $j;
$r = rand(1, 9999);
echo(" | echo(" bgcolor=\"$color[$r]\"> ");
}
echo("
");
}
?>