Try to create an instant of the class like this: <?php class test { var $table = "val";
function showName() { return $this->table; } } $test = new Test; echo $test->showName(); ?> ----- Original Message ----- From: "Matt Williams" <[EMAIL PROTECTED]> To: "PHP General List" <[EMAIL PROTECTED]>; "PHP_UK@egroups." <[EMAIL PROTECTED]> Sent: Thursday, October 18, 2001 4:25 PM Subject: [PHP] class problems > Any ideas why this won't output anything > > <?php > class test > { > var $table = "matt"; > > function showName() > { > return $this->table; > } > > } > > echo test::showName(); > > ?> > > I have other classes along the similar lines but a lot bigger which work > fine. > I'm also using phplib which has a lot of this stuff going on... > > I remeber seeing something regarding it in the manual but i don't get how > it's all worked before. > > I'm using php4.06 apache 1.3.19 on win2k. > > TIA > > M: > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]