[UPHPU] Calling an object within an object
Jon Jensen
jon at jenseng.com
Fri Jun 9 17:58:21 MDT 2006
Whenever referencing a member variable from inside of a class function, you
need to use the $this reference, otherwise it will look for the variable in
the local scope (of the function).
return $one->makeSelect($Array);
//Throws an error, because there is no variable $one in the local scope
return $this->one->makeSelect($Array);
//Should work just fine, since the object has a member variable $one
Jon
More information about the UPHPU
mailing list