Posted by Vince Morgan on 04/20/07 21:23
"Vince Morgan" <vinhar@REMOVEoptusnet.com.au> wrote in message
news:46292dbe$0$5748$afc38c87@news.optusnet.com.au...
I'm clrealy confused, as this one does too.
class C_Obj
{
public $Obj=array('h'=>10,'i'=>12);
private function getVal($name)
{
return $this->Obj[$name];
}
function __set($name, $val)
{
$name = $val;
}
function __get($name)
{
return self::getVal($name);
}
}
$obj = new C_Obj;
$obj->h=5;
echo $obj->h."<br>";
Vince
[Back to original message]
|