<?php
 function table($n) //几行几列表
 {
     echo'<table  border="1" width="500" height="200" align="center"  bordercolor=green             cellpadding="0 "cellspacing="0">';  
     echo '<caption><h1>表名</h1></caption>';
     for($i=0;$i<$n;$i++)
     {  
            if($i%2==0)
               $bg="#ffffff"; 
        else
              $bg="#cccccc";
        echo'<tr bgcolor="'.$bg.'">';
            for($j=0;$j<$n;$j++)
             { 
            echo '<td></td>'    ;     
             }
        echo'</tr>';
          }
      echo'</table>';
}
   table(10);
?>

 

相关文章:

  • 2022-12-23
  • 2021-12-05
  • 2021-05-19
  • 2023-02-18
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案