87. PHP Program to Print Multiples of given number upto 200.
How does this program work?
- This program is used to print multiples of given number upto 200 using PHP.
Here is the code
<html>
<head>
<title>PHP Program To print Multiples of given number upto 200</title>
</head>
<body>
<form method="post">
<table border="0">
<tr>
<td> <input type="text" name="num" value="" placeholder="Enter a number"/> </td>
</tr>
<tr>
<td> <input type="submit" name="submit" value="Submit"/> </td>
</tr>
</table>
</form>
<?php
if(isset($_POST['submit']))
{
$n = $_POST['num'];
echo ("The Multiples of $n : ") ;
for($i = 1; $i <= 200; $i++)
if($i % $n == 0)
echo $i." ";
return 0;
}
?>
</body>
</html>