Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>First Steps Into PHP</title>
- <style>
- table * {
- border: 1px solid black;
- width: 50px;
- height: 50px;
- }
- </style>
- </head>
- <body>
- <table>
- <tr>
- <td>
- Red
- </td>
- <td>
- Green
- </td>
- <td>
- Blue
- </td>
- </tr>
- <?php
- for ($i = 51; $i <= 255; $i+=51) {
- echo "<tr>\n";
- $colorRed = "rgb($i, 0, 0)";
- $colorGreen = "rgb(0, $i, 0)";
- $colorBlue= "rgb(0, 0, $i)";
- echo "\t<td style = 'background-color:$colorRed'>";
- echo "\t<td style = 'background-color:$colorGreen'>";
- echo "\t<td style = 'background-color:$colorBlue'>";
- echo "</tr>\n";
- }
- ?>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement