<html> <head> <title>Accessing a Property from Within a Method</title> <body> <?php class first_class{ var $name="Joe"; function sayHello(){ print "my name is $this->name<BR>"; } } $obj1 = new first_class(); $obj1->sayHello(); ?> </body> </html>