/ Published in: PHP
Expand |
Embed | Plain Text
<? $start_x = 0; $start_y = 0; $end_x = 8; $end_y = 8; for($c1=$start_x; $c1<$end_x; ++$c1){ for($c2=$start_y; $c2<$end_y; ++$c2){ $col = ($c1%2==0)?(($c2%2==0)?'#5A4E38':'#B29F7A'):(($c2%2==0)?'#B29F7A':'#5A4E38'); echo '<div style="position:absolute;left:'.($c1*20+$margin[0]).'px;top:'.($c2*20+$margin[1]).'px;padding:10px;background:'.$col.';"></div>'."\n"; } } ?>
You need to login to post a comment.
