Blogger Information
Blog 18
fans 0
comment 0
visits 24368
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
自定义函数之表格换行变色
耀的博客
Original
1323 people have browsed it

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;



Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post