echo '<table border="1" width="800px">';
function demo($color1,$a=10,$b=10,$color="pink"){
for($i=0;$i<$a;$i++){
if($i*$a%($a+$b)==0){
echo "<tr bgcolor='$color'>";
}else{
echo"<tr bgcolor='$color1'>";
}
for($j=0;$j<$b;$j++){
echo '<td align="center">'.($i*10+$j).'</td>';
}
echo '</tr>';
}
return "<table>";
}
$demo=demo('red');
echo $demo;
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号