A Class with a Method : Class Method : Class PHP Source Code


PHP Source Code » Class » Class Method »

 

A Class with a Method



<html>
<head>
<title>A Class with a Method</title>
<body>
<?php
class first_class{
    var $name;
    function sayHello(){
        print "hi";
    }
}

$obj1 = new first_class();
$obj1->sayHello();

 ?>
</body>
</html>

           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Class
» Class Method