dear all ...
i have question, i've tried look at google but still can't figured out
how to do it...
i want access parent property from child object the code was like
?
class DAO
{
private $db;
private $id;
protected function getId()
{
return $this-id;
}
Suprie wrote:
function getDB()
{
return $this-$db;
}
There should not be a $ before db. It should be $this-db. That's why
PHP is telling you the property is empty... because it is.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To
-Original Message-
From: Suprie [mailto:[EMAIL PROTECTED]
Sent: 09 August 2007 11:13
To: php-general@lists.php.net
Subject: [PHP] Access parent property from child
dear all ...
i have question, i've tried look at google but still can't figured out
how to do it...
i want
ouch... hey it's work rite now... thanks a lot for your help Edward
and Stut, i really apprieciate it...
br///
On 8/9/07, Stut [EMAIL PROTECTED] wrote:
Suprie wrote:
function getDB()
{
return $this-$db;
}
There should not be a $ before db. It should be $this-db.
4 matches
Mail list logo