WRITE A PROGRAM TO PRINT A TABLE
Program are as follows :----
<!doctype html>
<html>
<head>
<title> Table</title>
</head>
<body>
<form method="post">
Enter the no.:
<input type="number" name="n" style="margin-left:5%;" /><br><br>
<input type="submit" name="submit" value="Result" style="margin-left:5%;margin-top:2%;"> <br><br><br>
</form>
<?php
if(isset($_POST['submit']))
{
$n = $_POST['n'];
$r =0;
for ($row=1; $row = $n; $row++)
{
echo"Table of $n:<br>";
for($i=1; $i<= 10; $i++)
{
$r = $n*$i;
echo $n ."  *". $i."  =".$r." <br>";
}
$n--;
}
}
?>
</body>
</html>
Write a Program To Create a Form With Personal Details
write a program to add two numbers in PHP and HTML
write a Program to print table in PHP using Html
Comments
Post a Comment