Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <head>
- </head>
- <body>
- <style>
- table, tr, td, th{
- border: 1px solid black;
- text-align: center;
- margin: 0;
- padding: 0;
- }
- </style>
- <table>
- <th>
- <p> </p>
- </th>
- <?php
- for($i=1;$i<=10;$i++){
- echo "<th>".($i*12)."</th>";
- }
- for($a=12;$a<=120;$a=$a+12){
- echo "<tr>";
- echo "<th>".$a."</th>";
- for($b=12;$b<=120;$b=$b+12){
- if($a == $b)
- {
- echo "<td style='background-color: yellow'>".($a*$b)."</td>";
- }
- else if($a==$b)
- {
- echo "<td>".($a*$b)."</td>";
- }
- echo "<td>".($a*$b)."</td>";
- }
- echo "</tr>";
- }
- ?>
- </table>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement