here is my basic class.
class testclass
{ var $test = "12";
function getclass($test)
{ $this->test = "15";
}
}
i am trying to make it so that this code
$testing = new testclass;
print "variable 1: ".$testing->test."<br>\n";
print out 15.
i could do it this way
class testclass
{ var $test = "12";
function getclass($test)
{ $returntest = 15;
return ($returntest);
}
}
$testing = new testclass;
print "variable 1: ".$testing->getclass()."<br>\n";
but i am going to be making random numbers and i dont want them to change everytime.....not sure if i explained this real well.