Write a PHP script that creates the following table using for loops. Add cellpadding="3px" and cellspacing="0px" to the table tag.
<!DOCTYPE html> <html> <body> <table align="left" border="1" cellpadding="3" cellspacing="0"> <?php for($i=1;$i<=6;$i++) { echo "<tr>"; for ($j=1;$j<=5;$j++) { echo "<td>$i * $j = ".$i*$j."</td>"; } echo "</tr>"; } ?> </table> </body> </html>
Sample Output:
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output: