I have a question about using variables in classes.
With the following code:
<?
class myTest
{
var $first;
var $second;
var $third;
function myTest()
{
$this->$first="First";
$this->$second="Second";
$this->$third="Third";
}
function out()
{
print($this->$first);
print($this->$second);
print($this->$third);
}
}
$justatest = new myTest();
$justatest->out;
?>
The output that I get is:
ThirdThirdThird
What am I doing wrong with the variables here??