<?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);
?>
按键盘手指磨破皮2017-09-08 09:47:30
You have to say it clearly if you want to give me advice. I think your code is probably reporting an error, because your Green and Blue do not have quotation marks. If you add quotation marks, the error will not be reported