Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>First Steps Into PHP</title>
  6.     <style>
  7.         div {
  8.             display: inline-block;
  9.             margin: 5px;
  10.             width: 20px;
  11.             height: 20px;
  12.         }
  13.     </style>
  14. </head>
  15. <body>
  16.     <?php
  17.         for ($i = 0; $i <=204; $i+=51){
  18.             for ($j = $i; $j <=$i+45; $j+=5){
  19.     ?>
  20.             <div style="background-color: rgb(<?=$j?>, <?=$j?>, <?=$j?>)"></div>
  21.         <?php
  22.             }
  23.             echo "<br />";
  24.         }
  25.         ?>
  26. </body>
  27. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement