Advertisement
Guest User

RGB Table

a guest
Jul 7th, 2016
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. <?php
  2. $row = 5;
  3. $col = 3;
  4. $color = 51;
  5. for ($r = 1; $r <= $row; $r++)
  6. {
  7. echo "<tr>";
  8. echo "<td style =\"background-color: rgb($color, 0, 0)\"></td>";
  9. echo "<td style =\"background-color: rgb(0, $color, 0)\"></td>";
  10. echo "<td style =\"background-color: rgb(0, 0, $color)\"></td>";
  11. echo "</tr>";
  12. $color += 51;
  13. }
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement