<?php
function BG($B,$G = Green){
$i = 1;
while ( $i < 10) {
echo '<table width="800" border = "1" >';
if ($i%1 == 0) {
echo "<tr bgcolor = '$G' />";
if ($i%2 == 0) {
echo "<tr bgcolor = '$B' />";
}
}
echo '<td>' .$i. '</td>';
$i++;
echo '</table>';
}
return;
}
BG(Blue);
?>
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你想指点啥也要说清楚呀,我看你代码估计是报错的问题,因为你的Green和Blue没有加引号,加上引号就不报错啦