View Single Post
Old 05-09-2008, 10:33 AM   #1 (permalink)
JabberGabber
The Wanderer
 
Join Date: May 2008
Posts: 5
Thanks: 3
JabberGabber is on a distinguished road
Default Undefined variables issues

Help !

What am I missing here ??

I have the following:

PHP Code:
class Test
{
  var 
$var1;
  
  function 
Set($var1)
  {
     
$this->$var1 $var1;
  }
  function 
Show()
  {
    echo 
$this->$var1;
  }
}

$Test = new Test();
$Var 1;
$Test->Set($Var);
$Test->Show() 
and I get a Undefined Variable var1 ... cannot access empty property .... error message for the line

$this->$var1 = $var1;

Any ideas anyone .... thanks in advance

JabberGabber
JabberGabber is offline  
Reply With Quote