Can't figure out how to get at the properties of an object which itself is a
property of another object. In sample code below neither the assignment of
$mystring produces an error.


class Obj1 {
    function Obj1 ($string) {
        $this->string = $string;

class Obj2 {
    function Obj1 ($obj) {
        $this->obj = $obj;
    var $mystring = $this->obj->string;

$o1 = New Obj1("hello");
$o2 = New Obj2($o1);
print "\$o2->mystring = $o2->mystring<br>"


Randall Perry

Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to