Posted by Bob Hartung on 10/20/05 06:12
Hi all,
I am trying to get going with oop in php. This little script prints
nothing to the page.
<?php
// define classtest.php
class Test
{
var $lname = "Smith" ;
function get()
{
return $lname ;
} // end of function get()
} // end of class test
// body of code
$whyme = new Test ;
echo $whyme->get() ;
?>
All help appreciated. AFAIK this should work. PHP 5 & Apache
[Back to original message]
|