calrecsq.php
<?php
Class abc
{
function getrec($x,$y)
	{
		$p = $x*$y;
		return($p);
	}
function getsq($x)
	{
		$p = $x*$x;
		return($p);
	}
}
?>
index.php
<?php
require("calrecsq.php");
?>
<html>
<head>
	<title>My Web Page</title>
</head>
<body>
<?php
$s = new abc();
//$s1 = new abc();
echo "<br>"."The area of rectangle is " .$s->getrec(5,5);
echo "<br>"."The area of Square is " .$s->getsq(6);
?>
</body>
</html>
Categories: Tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *

five × one =