PHP MULTIPLICATION TABLE
<html>
<body>
<?php
echo "<table border=\"1\">";
echo "<tr>";
for($i=1; $i<=10; $i++)
{
for($a=1; $a<=10; $a++)
{
echo "<td align=\"center\">";
$b = $a * $i;
echo $b;
echo "</td>";
}
echo "<br>";
echo"<tr>";
}
?>
</body>
</html>
PHP CALCULATOR USING FUNCTION
<html>
<body><?php
function add()
{
$x=20;$y=10;
echo $x+$y;
}
function mul()
{
$x=20;$y=10;
echo $x*$y;
}
function sub()
{
$x=20;$y=10;
echo $x-$y;
}
function div()
{
$x=20;$y=10;
echo $x+$y;
}
function mod()
{
$x=20;$y=10;
echo $x%$y;
}
echo "<table border=\"1\">";
echo "<tr>";
echo"<td>";
add();
echo"<br>";
mul();
echo"<br>";
sub();
echo"<br>";
div();
echo"<br>";
mod();
echo"<br>";
echo"<td>";
echo"</tr>";
?>
</body>
</html>
calculator using function with argument
<html>
<body><?php
function add($x,$y)
{
echo $x+$y;
}
function sub($x,$y)
{
echo $x-$y;
}
function mul($x,$y)
{
echo $x*$y;
}
function div($x,$y)
{
echo $x/$y;
}
echo "<table border=\"1\">";
echo "<tr>";
echo"<td>";
add(5,4);
echo"<br>";
sub();
echo"<br>";
mul(5,4);
echo"<br>";
div(5,4);
echo"<br>";
echo"<td>";
echo"</tr>";
?>
</body>
</html>
IF YOU HAVE ANY QUERRY RELATED TO ANYTHING .PLEASE
ReplyDeleteWRITE IN COMMENT BOX .I WILL SOLVED IT ON MY BLOG.