<html>
<head>
<title>Class with Method</title>
</head>
<body>
<?php
class first_class
{
var $name;
function hello()
{
print "Hello";
}
}
$obj1 = new first_class();
$obj1->hello();
?>
</body>
</html>
OUTPUT
Hello
<head>
<title>Class with Method</title>
</head>
<body>
<?php
class first_class
{
var $name;
function hello()
{
print "Hello";
}
}
$obj1 = new first_class();
$obj1->hello();
?>
</body>
</html>
OUTPUT
Hello
No comments:
Post a Comment